summaryrefslogtreecommitdiff
path: root/builtin-commit-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-30 20:20:43 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-30 23:58:43 (GMT)
commit677cfed56ac530878b746ee4cca3ada8af384a81 (patch)
tree19b8162432db50d0940067236af6ec8791a9ac03 /builtin-commit-tree.c
parent7cbcf4d5579bdc5d9f8a4bf3f37d3390fc6e2572 (diff)
downloadgit-677cfed56ac530878b746ee4cca3ada8af384a81.zip
git-677cfed56ac530878b746ee4cca3ada8af384a81.tar.gz
git-677cfed56ac530878b746ee4cca3ada8af384a81.tar.bz2
commit-tree: cope with different ways "utf-8" can be spelled.
People can spell config.commitencoding differently from what we internally have ("utf-8") to mean UTF-8. Try to accept them and treat them equally. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-commit-tree.c')
-rw-r--r--builtin-commit-tree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c
index 146aaff..0651e59 100644
--- a/builtin-commit-tree.c
+++ b/builtin-commit-tree.c
@@ -119,8 +119,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
}
/* Not having i18n.commitencoding is the same as having utf-8 */
- encoding_is_utf8 = (!git_commit_encoding ||
- !strcmp(git_commit_encoding, "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));