rev-list: documentation and test for --cherry-mark
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael J Gruber committed
Mar 7, 2011 at 13:31 UTC
cb56e3093a1b25e105df44640e2224c8f6e6b893
3 files changed
+34
Documentation/git-rev-list.txt
+1
@@ -33,6 +33,7 @@ SYNOPSIS
33
[ \--left-right ]
34
[ \--left-only ]
35
[ \--right-only ]
36
+ [ \--cherry-mark ]
37
[ \--cherry-pick ]
38
[ \--encoding[=<encoding>] ]
39
[ \--(author|committer|grep)=<pattern> ]
Documentation/rev-list-options.txt
+5
@@ -305,6 +305,11 @@ ifdef::git-rev-list[]
305
to /dev/null as the output does not have to be formatted.
306
endif::git-rev-list[]
307
308
+--cherry-mark::
309
+
310
+ Like `--cherry-pick` (see below) but mark equivalent commits
311
+ with `=` rather than omitting them, and inequivalent ones with `+`.
312
+
313
--cherry-pick::
314
315
Omit any commit that introduces the same change as
t/t6007-rev-list-cherry-pick-file.sh
+28
@@ -99,6 +99,34 @@ test_expect_success '--cherry-pick bar does not come up empty (II)' '
99
test_cmp actual.named expect
100
'
101
102
+cat >expect <<EOF
103
++tags/F
104
+=tags/D
105
++tags/E
106
+=tags/C
107
+EOF
108
+
109
+test_expect_success '--cherry-mark' '
110
+ git rev-list --cherry-mark F...E -- bar > actual &&
111
+ git name-rev --stdin --name-only --refs="*tags/*" \
112
+ < actual > actual.named &&
113
+ test_cmp actual.named expect
114
+'
115
+
116
+cat >expect <<EOF
117
+<tags/F
118
+=tags/D
119
+>tags/E
120
+=tags/C
121
+EOF
122
+
123
+test_expect_success '--cherry-mark --left-right' '
124
+ git rev-list --cherry-mark --left-right F...E -- bar > actual &&
125
+ git name-rev --stdin --name-only --refs="*tags/*" \
126
+ < actual > actual.named &&
127
+ test_cmp actual.named expect
128
+'
129
+
130
cat >expect <<EOF
131
tags/E
132
EOF