From 677cfed56ac530878b746ee4cca3ada8af384a81 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 30 Dec 2006 12:20:43 -0800 Subject: 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 --- builtin-commit-tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin-commit-tree.c') diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c index 146aaffd28..0651e5927e 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)); -- cgit v1.2.3