t6007: test rev-list --cherry
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
fe3b59e595b02ee57314b74a74df915bdd845011
1 file changed
+12
t/t6007-rev-list-cherry-pick-file.sh
+12
@@ -145,6 +145,18 @@ test_expect_success '--cherry-pick --left-only' '
145
test_cmp actual.named expect
146
'
147
148
+cat >expect <<EOF
149
++tags/E
150
+=tags/C
151
+EOF
152
+
153
+test_expect_success '--cherry' '
154
+ git rev-list --cherry F...E -- bar > actual &&
155
+ git name-rev --stdin --name-only --refs="*tags/*" \
156
+ < actual > actual.named &&
157
+ test_cmp actual.named expect
158
+'
159
+
160
test_expect_success '--cherry-pick with independent, but identical branches' '
161
git symbolic-ref HEAD refs/heads/independent &&
162
rm .git/index &&