Code

Remove unnecessary argc parameter from run_command_v.
[git.git] / builtin-commit-tree.c
index 33c29f7495afad0342545a7e6854c3e3032a69e2..0651e5927e836d22246d84020576ccb3069b6c5d 100644 (file)
@@ -118,7 +118,8 @@ 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 = is_encoding_utf8(git_commit_encoding);
 
        init_buffer(&buffer, &size);
        add_buffer(&buffer, &size, "tree %s\n", sha1_to_hex(tree_sha1));