path: root/builtin/commit.c
diff options
authorNguyễn Thái Ngọc Duy <>2013-04-18 23:08:40 (GMT)
committerJunio C Hamano <>2013-04-18 23:28:27 (GMT)
commit5a10d236583f4a674e8fd969c877844c0a9ccb17 (patch)
tree42f75dd4a87ae830a9474884b24b26ee341b2e3a /builtin/commit.c
parent1468a5839309033feb2e58943babdd48b8e2d151 (diff)
pretty: save commit encoding from logmsg_reencode if the caller needs it
The commit encoding is parsed by logmsg_reencode, there's no need for the caller to re-parse it again. The reencoded message now has the new encoding, not the original one. The caller would need to read commit object again before parsing. Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/commit.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 4620437..d2f30d9 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -955,7 +955,7 @@ static const char *read_commit_message(const char *name)
if (!commit)
die(_("could not lookup commit %s"), name);
out_enc = get_commit_output_encoding();
- return logmsg_reencode(commit, out_enc);
+ return logmsg_reencode(commit, NULL, out_enc);
static int parse_and_validate_options(int argc, const char *argv[],