From 5ce0680fe622464b45fbccec7ab0505572ef6d39 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 7 Nov 2022 18:36:00 +0000 Subject: t3210: require packed-refs v1 for some tests Three tests in t3210-pack-refs.sh corrupt a packed-refs file to test that Git properly discovers and handles those failures. These tests assume that the file is in the v1 format, so add the PACKED_REFS_V1 prereq to skip these tests when GIT_TEST_PACKED_REFS_VERSION=2. Signed-off-by: Derrick Stolee Signed-off-by: Taylor Blau --- t/t3210-pack-refs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index fe6c97d908..76251dfe05 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -197,7 +197,7 @@ test_expect_success 'notice d/f conflict with existing ref' ' test_must_fail git branch foo/bar/baz/lots/of/extra/components ' -test_expect_success 'reject packed-refs with unterminated line' ' +test_expect_success PACKED_REFS_V1 'reject packed-refs with unterminated line' ' cp .git/packed-refs .git/packed-refs.bak && test_when_finished "mv .git/packed-refs.bak .git/packed-refs" && printf "%s" "$HEAD refs/zzzzz" >>.git/packed-refs && @@ -206,7 +206,7 @@ test_expect_success 'reject packed-refs with unterminated line' ' test_cmp expected_err err ' -test_expect_success 'reject packed-refs containing junk' ' +test_expect_success PACKED_REFS_V1 'reject packed-refs containing junk' ' cp .git/packed-refs .git/packed-refs.bak && test_when_finished "mv .git/packed-refs.bak .git/packed-refs" && printf "%s\n" "bogus content" >>.git/packed-refs && @@ -215,7 +215,7 @@ test_expect_success 'reject packed-refs containing junk' ' test_cmp expected_err err ' -test_expect_success 'reject packed-refs with a short SHA-1' ' +test_expect_success PACKED_REFS_V1 'reject packed-refs with a short SHA-1' ' cp .git/packed-refs .git/packed-refs.bak && test_when_finished "mv .git/packed-refs.bak .git/packed-refs" && printf "%.7s %s\n" $HEAD refs/zzzzz >>.git/packed-refs && -- cgit v1.2.1