summaryrefslogtreecommitdiff
path: root/builtin/mailinfo.c
diff options
context:
space:
mode:
authorPat Notz <patnotz@gmail.com>2010-11-02 19:59:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-11-04 20:53:34 (GMT)
commita6fa59924d154f2dcfc331357bf553e043aa0242 (patch)
tree0b70643b0e0a30f6d97acce2a9142af0a80fcde7 /builtin/mailinfo.c
parentc752e7f3e8d96a9673ad248addc9418164bd3ce6 (diff)
downloadgit-a6fa59924d154f2dcfc331357bf553e043aa0242.zip
git-a6fa59924d154f2dcfc331357bf553e043aa0242.tar.gz
git-a6fa59924d154f2dcfc331357bf553e043aa0242.tar.bz2
commit: helper methods to reduce redundant blocks of code
* builtin/commit.c: Replace block of code with a one-liner call to logmsg_reencode(). * commit.c: new function for looking up a comit by name * pretty.c: helper methods for getting output encodings Add helpers get_log_output_encoding() and get_commit_output_encoding() that eliminate some messy and duplicate if-blocks. Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mailinfo.c')
-rw-r--r--builtin/mailinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 2320d98..71e6262 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -1032,7 +1032,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
*/
git_config(git_mailinfo_config, NULL);
- def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8");
+ def_charset = get_commit_output_encoding();
metainfo_charset = def_charset;
while (1 < argc && argv[1][0] == '-') {