diff options
author | Adam Simpkins <adam@adamsimpkins.net> | 2008-05-25 00:07:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-25 12:06:52 -0700 |
commit | 7528f27dd677bed65d758667a621034b853595b4 (patch) | |
tree | 797d4b938da70fa66485546886c4839315f9933d /log-tree.c | |
parent | 37a75abc985a25a0612c2c176ed35d438722752d (diff) | |
download | git-7528f27dd677bed65d758667a621034b853595b4.tar.gz git-7528f27dd677bed65d758667a621034b853595b4.tar.xz |
log --graph --left-right: show left/right information in place of '*'
With the --graph option, the graph already outputs 'o' instead of '*'
for boundary commits. Make it emit '<' or '>' when --left-right is
specified.
(This change also disables the '^' prefix for UNINTERESTING commits.
The graph code currently doesn't print anything special for these
commits, since it assumes no UNINTERESTING, non-BOUNDARY commits are
displayed. This is potentially a bug if UNINTERESTING non-BOUNDARY
commits can actually be displayed via some code path.)
[jc: squashed the left-right change from Dscho and Adam's fixup into one]
Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/log-tree.c b/log-tree.c index 1474d1f5d..5505606ed 100644 --- a/log-tree.c +++ b/log-tree.c @@ -228,15 +228,17 @@ void show_log(struct rev_info *opt) if (!opt->verbose_header) { graph_show_commit(opt->graph); - if (commit->object.flags & BOUNDARY) - putchar('-'); - else if (commit->object.flags & UNINTERESTING) - putchar('^'); - else if (opt->left_right) { - if (commit->object.flags & SYMMETRIC_LEFT) - putchar('<'); - else - putchar('>'); + if (!opt->graph) { + if (commit->object.flags & BOUNDARY) + putchar('-'); + else if (commit->object.flags & UNINTERESTING) + putchar('^'); + else if (opt->left_right) { + if (commit->object.flags & SYMMETRIC_LEFT) + putchar('<'); + else + putchar('>'); + } } fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); if (opt->print_parents) @@ -293,15 +295,18 @@ void show_log(struct rev_info *opt) fputs(diff_get_color_opt(&opt->diffopt, DIFF_COMMIT), stdout); if (opt->commit_format != CMIT_FMT_ONELINE) fputs("commit ", stdout); - if (commit->object.flags & BOUNDARY) - putchar('-'); - else if (commit->object.flags & UNINTERESTING) - putchar('^'); - else if (opt->left_right) { - if (commit->object.flags & SYMMETRIC_LEFT) - putchar('<'); - else - putchar('>'); + + if (!opt->graph) { + if (commit->object.flags & BOUNDARY) + putchar('-'); + else if (commit->object.flags & UNINTERESTING) + putchar('^'); + else if (opt->left_right) { + if (commit->object.flags & SYMMETRIC_LEFT) + putchar('<'); + else + putchar('>'); + } } fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); |