From: Junio C Hamano Date: Sat, 30 Dec 2006 10:18:24 +0000 (-0800) Subject: commit re-encoding: fix confusion between no and default conversion. X-Git-Tag: v1.5.0-rc1~152 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4b46e22d48271d1a220133a925dc5009048eb577;p=git.git commit re-encoding: fix confusion between no and default conversion. Telling the git-log family not to do any character conversion is done with --encoding=none, which sets log_output_encoding to an empty string. However, logmsg_reencode() confused this with log_output_encoding and commit_encoding set to NULL. The latter means we should use the default encoding (i.e. utf-8). Signed-off-by: Junio C Hamano --- diff --git a/commit.c b/commit.c index eb06afbbe..e13b9cb6a 100644 --- a/commit.c +++ b/commit.c @@ -633,6 +633,8 @@ static char *logmsg_reencode(const struct commit *commit) : git_commit_encoding); if (!output_encoding) + output_encoding = "utf-8"; + else if (!*output_encoding) return NULL; encoding = get_header(commit, "encoding"); if (!encoding || !strcmp(encoding, output_encoding)) {