diff options
Diffstat (limited to 'builtin-commit-tree.c')
-rw-r--r-- | builtin-commit-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c index 33c29f7495..146aaffd28 100644 --- a/builtin-commit-tree.c +++ b/builtin-commit-tree.c @@ -118,7 +118,9 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix) parents++; } - encoding_is_utf8 = !strcmp(git_commit_encoding, "utf-8"); + /* Not having i18n.commitencoding is the same as having utf-8 */ + encoding_is_utf8 = (!git_commit_encoding || + !strcmp(git_commit_encoding, "utf-8")); init_buffer(&buffer, &size); add_buffer(&buffer, &size, "tree %s\n", sha1_to_hex(tree_sha1)); |