diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-16 15:31:25 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-17 10:35:28 -0800 |
commit | 74bd9029732db28b2fff50de0a190229c6033e02 (patch) | |
tree | 136b4527d1126149a7f05576a0d957d28fd79ac5 /log-tree.c | |
parent | 577ed5c20b4ca374626c104f90c88550cf415067 (diff) | |
download | git-74bd9029732db28b2fff50de0a190229c6033e02.tar.gz |
Teach all of log family --left-right output.
This makes reviewing
git log --left-right --merge --no-merges -p
a lot more pleasant.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/log-tree.c b/log-tree.c index 8787df5cc6..35be33aaf7 100644 --- a/log-tree.c +++ b/log-tree.c @@ -114,6 +114,14 @@ void show_log(struct rev_info *opt, const char *sep) opt->loginfo = NULL; if (!opt->verbose_header) { + if (opt->left_right) { + if (commit->object.flags & BOUNDARY) + putchar('-'); + else if (commit->object.flags & SYMMETRIC_LEFT) + putchar('<'); + else + putchar('>'); + } fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); if (opt->parents) show_parents(commit, abbrev_commit); @@ -192,10 +200,20 @@ void show_log(struct rev_info *opt, const char *sep) opt->diffopt.stat_sep = buffer; } } else { - printf("%s%s%s", - diff_get_color(opt->diffopt.color_diff, DIFF_COMMIT), - opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ", - diff_unique_abbrev(commit->object.sha1, abbrev_commit)); + fputs(diff_get_color(opt->diffopt.color_diff, DIFF_COMMIT), + stdout); + if (opt->commit_format != CMIT_FMT_ONELINE) + fputs("commit ", stdout); + if (opt->left_right) { + if (commit->object.flags & BOUNDARY) + putchar('-'); + else if (commit->object.flags & SYMMETRIC_LEFT) + putchar('<'); + else + putchar('>'); + } + fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), + stdout); if (opt->parents) show_parents(commit, abbrev_commit); if (parent) |