summaryrefslogtreecommitdiff
path: root/builtin-rev-list.c
diff options
context:
space:
mode:
authorAdam Simpkins <adam@adamsimpkins.net>2008-05-25 00:07:21 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-25 12:06:52 -0700
commit7528f27dd677bed65d758667a621034b853595b4 (patch)
tree797d4b938da70fa66485546886c4839315f9933d /builtin-rev-list.c
parent37a75abc985a25a0612c2c176ed35d438722752d (diff)
downloadgit-7528f27dd677bed65d758667a621034b853595b4.tar.gz
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 'builtin-rev-list.c')
-rw-r--r--builtin-rev-list.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 54d55cc3a3..b474527402 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -65,15 +65,18 @@ static void show_commit(struct commit *commit)
printf("%lu ", commit->date);
if (header_prefix)
fputs(header_prefix, stdout);
- if (commit->object.flags & BOUNDARY)
- putchar('-');
- else if (commit->object.flags & UNINTERESTING)
- putchar('^');
- else if (revs.left_right) {
- if (commit->object.flags & SYMMETRIC_LEFT)
- putchar('<');
- else
- putchar('>');
+
+ if (!revs.graph) {
+ if (commit->object.flags & BOUNDARY)
+ putchar('-');
+ else if (commit->object.flags & UNINTERESTING)
+ putchar('^');
+ else if (revs.left_right) {
+ if (commit->object.flags & SYMMETRIC_LEFT)
+ putchar('<');
+ else
+ putchar('>');
+ }
}
if (revs.abbrev_commit && revs.abbrev)
fputs(find_unique_abbrev(commit->object.sha1, revs.abbrev),