t0302 & t3900: add forgotten quotes
[gitweb.git] / t / t6007-rev-list-cherry-pick-file.sh
index 1408b608eb030f0e6bcc3d531aad426da5f06b12..29597451967dd7e4847a5114b79a91399e1b3ab3 100755 (executable)
@@ -99,6 +99,44 @@ test_expect_success '--cherry-pick bar does not come up empty (II)' '
        test_cmp actual.named expect
 '
 
+test_expect_success 'name-rev multiple --refs combine inclusive' '
+       git rev-list --left-right --cherry-pick F...E -- bar >actual &&
+       git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" \
+               <actual >actual.named &&
+       test_cmp actual.named expect
+'
+
+cat >expect <<EOF
+<tags/F
+EOF
+
+test_expect_success 'name-rev --refs excludes non-matched patterns' '
+       git rev-list --left-right --right-only --cherry-pick F...E -- bar >>expect &&
+       git rev-list --left-right --cherry-pick F...E -- bar >actual &&
+       git name-rev --stdin --name-only --refs="*tags/F" \
+               <actual >actual.named &&
+       test_cmp actual.named expect
+'
+
+cat >expect <<EOF
+<tags/F
+EOF
+
+test_expect_success 'name-rev --exclude excludes matched patterns' '
+       git rev-list --left-right --right-only --cherry-pick F...E -- bar >>expect &&
+       git rev-list --left-right --cherry-pick F...E -- bar >actual &&
+       git name-rev --stdin --name-only --refs="*tags/*" --exclude="*E" \
+               <actual >actual.named &&
+       test_cmp actual.named expect
+'
+
+test_expect_success 'name-rev --no-refs clears the refs list' '
+       git rev-list --left-right --cherry-pick F...E -- bar >expect &&
+       git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" --no-refs --refs="*tags/G" \
+               <expect >actual &&
+       test_cmp actual expect
+'
+
 cat >expect <<EOF
 +tags/F
 =tags/D