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 <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
fa0f4e46f5
commit
ed9cc2144c
@@ -712,6 +712,25 @@ test_expect_success 'start after, overflow specific reference path' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'start after, with exclude pattern' '
|
||||||
|
cat >expect <<-\EOF &&
|
||||||
|
refs/tags/annotated-tag
|
||||||
|
refs/tags/doubly-annotated-tag
|
||||||
|
refs/tags/doubly-signed-tag
|
||||||
|
refs/tags/foo1.10
|
||||||
|
refs/tags/foo1.3
|
||||||
|
refs/tags/foo1.6
|
||||||
|
refs/tags/four
|
||||||
|
refs/tags/one
|
||||||
|
refs/tags/signed-tag
|
||||||
|
refs/tags/three
|
||||||
|
refs/tags/two
|
||||||
|
EOF
|
||||||
|
git for-each-ref --format="%(refname)" --start-after=refs/odd/spot \
|
||||||
|
--exclude=refs/tags/foo >actual &&
|
||||||
|
test_cmp expect actual
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'start after, last reference' '
|
test_expect_success 'start after, last reference' '
|
||||||
cat >expect <<-\EOF &&
|
cat >expect <<-\EOF &&
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user