Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-30 13:18:24 +0300
committerJunio C Hamano <junkio@cox.net>2006-12-30 13:18:24 +0300
commit4b46e22d48271d1a220133a925dc5009048eb577 (patch)
treece1c02dae62ea63a6c4e53d3f454cc553e778aff /commit.c
parent1ed4813f7d018eb35187209d43b98746a2e69542 (diff)
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 <junkio@cox.net>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index eb06afbbe0..e13b9cb6a3 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)) {