Skip to content

Commit

Permalink
Document --left-right option to rev-list.
Browse files Browse the repository at this point in the history
Explanation is paraphrased from "577ed5c... rev-list --left-right"

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Brian Gernhardt authored and Junio C Hamano committed Apr 5, 2007
1 parent 265d528 commit b24bace
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Documentation/git-rev-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ SYNOPSIS
[ \--stdin ]
[ \--topo-order ]
[ \--parents ]
[ \--left-right ]
[ \--encoding[=<encoding>] ]
[ \--(author|committer|grep)=<pattern> ]
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
Expand Down Expand Up @@ -100,6 +101,36 @@ include::pretty-formats.txt[]

Print the parents of the commit.

--left-right::

Mark which side of a symmetric diff a commit is reachable from.
Commits from the left side are prefixed with `<` and those from
the right with `>`. If combined with `--boundary`, those
commits are prefixed with `-`.
+
For example, if you have this topology:
+
-----------------------------------------------------------------------
y---b---b branch B
/ \ /
/ .
/ / \
o---x---a---a branch A
-----------------------------------------------------------------------
+
you would get an output line this:
+
-----------------------------------------------------------------------
$ git rev-list --left-right --boundary --pretty=oneline A...B

>bbbbbbb... 3rd on b
>bbbbbbb... 2nd on b
<aaaaaaa... 3rd on a
<aaaaaaa... 2nd on a
-yyyyyyy... 1st on b
-xxxxxxx... 1st on a
-----------------------------------------------------------------------

Diff Formatting
~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions builtin-rev-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static const char rev_list_usage[] =
" --header | --pretty\n"
" --abbrev=nr | --no-abbrev\n"
" --abbrev-commit\n"
" --left-right\n"
" special purpose:\n"
" --bisect"
;
Expand Down

0 comments on commit b24bace

Please sign in to comment.