Skip to content

Commit a8ebdb9

Browse files
Rene ScharfeJunio C Hamano
authored andcommitted
git-cherry: document limit and add diagram
This patch adds the diagram from the long usage string of git-cherry to its documentation, and documents the third option. I changed some of the + to - in order to save the reader from wondering where they might fit into the picture. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent ac1a1f9 commit a8ebdb9

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Documentation/git-cherry.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ git-cherry - Find commits not merged upstream
77

88
SYNOPSIS
99
--------
10-
'git-cherry' [-v] <upstream> [<head>]
10+
'git-cherry' [-v] <upstream> [<head>] [<limit>]
1111

1212
DESCRIPTION
1313
-----------
@@ -18,7 +18,22 @@ Every commit that doesn't exist in the <upstream> branch
1818
has its id (sha1) reported, prefixed by a symbol. The ones that have
1919
equivalent change already
2020
in the <upstream> branch are prefixed with a minus (-) sign, and those
21-
that only exist in the <head> branch are prefixed with a plus (+) symbol.
21+
that only exist in the <head> branch are prefixed with a plus (+) symbol:
22+
23+
__*__*__*__*__> <upstream>
24+
/
25+
fork-point
26+
\__+__+__-__+__+__-__+__> <head>
27+
28+
29+
If a <limit> has been given then the commits along the <head> branch up
30+
to and including <limit> are not reported:
31+
32+
__*__*__*__*__> <upstream>
33+
/
34+
fork-point
35+
\__*__*__<limit>__-__+__> <head>
36+
2237

2338
Because git-cherry compares the changeset rather than the commit id
2439
(sha1), you can use git-cherry to find out if a commit you made locally

0 commit comments

Comments
 (0)