Code

t6007: test rev-list --cherry
authorMichael J Gruber <git@drmicha.warpmail.net>
Mon, 7 Mar 2011 12:31:43 +0000 (13:31 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Mar 2011 21:50:55 +0000 (13:50 -0800)
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6007-rev-list-cherry-pick-file.sh

index 37bd25eaaaf5cd4daaf59e39549891944874a4a5..cacf3de6c9f31889fd8df0bc0cebbbc74e3525bd 100755 (executable)
@@ -145,6 +145,18 @@ test_expect_success '--cherry-pick --left-only' '
        test_cmp actual.named expect
 '
 
+cat >expect <<EOF
++tags/E
+=tags/C
+EOF
+
+test_expect_success '--cherry' '
+       git rev-list --cherry F...E -- bar > actual &&
+       git name-rev --stdin --name-only --refs="*tags/*" \
+               < actual > actual.named &&
+       test_cmp actual.named expect
+'
+
 test_expect_success '--cherry-pick with independent, but identical branches' '
        git symbolic-ref HEAD refs/heads/independent &&
        rm .git/index &&