summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorLibravatar Pat Notz <patnotz@gmail.com>2010-11-02 13:59:07 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-11-04 13:53:34 -0700
commita6fa59924d154f2dcfc331357bf553e043aa0242 (patch)
tree0b70643b0e0a30f6d97acce2a9142af0a80fcde7 /builtin/log.c
parentMerge branch 'maint' (diff)
downloadtgif-a6fa59924d154f2dcfc331357bf553e043aa0242.tar.xz
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/log.c')
-rw-r--r--builtin/log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 22d12903ac..90e05aca9d 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -329,8 +329,7 @@ static void show_tagger(char *buf, int len, struct rev_info *rev)
struct strbuf out = STRBUF_INIT;
pp_user_info("Tagger", rev->commit_format, &out, buf, rev->date_mode,
- git_log_output_encoding ?
- git_log_output_encoding: git_commit_encoding);
+ get_log_output_encoding());
printf("%s", out.buf);
strbuf_release(&out);
}