summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
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)) {