Skip to content

Commit ed9cc21

Browse files
KarthikNayakgitster
authored andcommitted
t6302: add test combining '--start-after' with '--exclude'
The '--start-after' doesn't explicitly mention being compatible with the '--exclude' flag, generally only incompatibility is explicitly called out. However, it would be nice to test the compatibility between the two to avoid future regressions. Let's do that. Signed-off-by: Karthik Nayak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fa0f4e4 commit ed9cc21

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

t/t6302-for-each-ref-filter.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,25 @@ test_expect_success 'start after, overflow specific reference path' '
712712
test_cmp expect actual
713713
'
714714

715+
test_expect_success 'start after, with exclude pattern' '
716+
cat >expect <<-\EOF &&
717+
refs/tags/annotated-tag
718+
refs/tags/doubly-annotated-tag
719+
refs/tags/doubly-signed-tag
720+
refs/tags/foo1.10
721+
refs/tags/foo1.3
722+
refs/tags/foo1.6
723+
refs/tags/four
724+
refs/tags/one
725+
refs/tags/signed-tag
726+
refs/tags/three
727+
refs/tags/two
728+
EOF
729+
git for-each-ref --format="%(refname)" --start-after=refs/odd/spot \
730+
--exclude=refs/tags/foo >actual &&
731+
test_cmp expect actual
732+
'
733+
715734
test_expect_success 'start after, last reference' '
716735
cat >expect <<-\EOF &&
717736
EOF

0 commit comments

Comments
 (0)