Code

rev-list: documentation and test for --cherry-mark
[git.git] / t / t6007-rev-list-cherry-pick-file.sh
index cd089a913bb93abc882db5a128429dab0d0275db..37bd25eaaaf5cd4daaf59e39549891944874a4a5 100755 (executable)
@@ -99,6 +99,34 @@ test_expect_success '--cherry-pick bar does not come up empty (II)' '
        test_cmp actual.named expect
 '
 
+cat >expect <<EOF
++tags/F
+=tags/D
++tags/E
+=tags/C
+EOF
+
+test_expect_success '--cherry-mark' '
+       git rev-list --cherry-mark F...E -- bar > actual &&
+       git name-rev --stdin --name-only --refs="*tags/*" \
+               < actual > actual.named &&
+       test_cmp actual.named expect
+'
+
+cat >expect <<EOF
+<tags/F
+=tags/D
+>tags/E
+=tags/C
+EOF
+
+test_expect_success '--cherry-mark --left-right' '
+       git rev-list --cherry-mark --left-right F...E -- bar > actual &&
+       git name-rev --stdin --name-only --refs="*tags/*" \
+               < actual > actual.named &&
+       test_cmp actual.named expect
+'
+
 cat >expect <<EOF
 tags/E
 EOF