summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-04-18 23:08:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-18 23:28:27 (GMT)
commit5a10d236583f4a674e8fd969c877844c0a9ccb17 (patch)
tree42f75dd4a87ae830a9474884b24b26ee341b2e3a /revision.c
parent1468a5839309033feb2e58943babdd48b8e2d151 (diff)
downloadgit-5a10d236583f4a674e8fd969c877844c0a9ccb17.zip
git-5a10d236583f4a674e8fd969c877844c0a9ccb17.tar.gz
git-5a10d236583f4a674e8fd969c877844c0a9ccb17.tar.bz2
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index eb98128..d739211 100644
--- a/revision.c
+++ b/revision.c
@@ -2291,7 +2291,7 @@ static int commit_match(struct commit *commit, struct rev_info *opt)
* in it.
*/
encoding = get_log_output_encoding();
- message = logmsg_reencode(commit, encoding);
+ message = logmsg_reencode(commit, NULL, encoding);
/* Copy the commit to temporary if we are using "fake" headers */
if (buf.len)