aboutsummaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-01-27 22:40:36 -0500
committerJunio C Hamano <junkio@cox.net>2007-01-28 01:54:42 -0800
commit903b45fe1808f72e712a118bf115b9dc07d02420 (patch)
tree5d0860beb6aa7d19487fe9c4bae5829e0b0d9131 /log-tree.c
parent16507fcf0a9991976815972faa253d77804d6f35 (diff)
downloadgit-903b45fe1808f72e712a118bf115b9dc07d02420.tar.gz
git-903b45fe1808f72e712a118bf115b9dc07d02420.tar.xz
git-log -g --pretty=oneline should display the reflog message
In the context of reflog output the reflog message is more useful than the commit message's first line. When relevant the reflog message will contain that line anyway. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/log-tree.c b/log-tree.c
index c0fa09632..d8ca36bbd 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -224,9 +224,14 @@ void show_log(struct rev_info *opt, const char *sep)
printf("%s",
diff_get_color(opt->diffopt.color_diff, DIFF_RESET));
putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
- if (opt->reflog_info)
+ if (opt->reflog_info) {
show_reflog_message(opt->reflog_info,
opt->commit_format == CMIT_FMT_ONELINE);;
+ if (opt->commit_format == CMIT_FMT_ONELINE) {
+ printf("%s", sep);
+ return;
+ }
+ }
}
/*