From: Derrick Stolee <derrickstolee@xxxxxxxxxx> The last test in t5502-quickfetch.sh exploits the packed-refs v1 file format by appending 1000 lines to the packed-refs file. If the packed-refs file is in the v2 format, this corrupts the file as unreadable. Instead of making the test slower, let's ignore it when GIT_TEST_PACKED_REFS_VERSION=2. The test is really about 'git fetch', not the packed-refs format. Create a prerequisite in case we want to use this technique again in the future. An alternative would be to write those 1000 refs using a different mechanism, but let's opt for the simpler case for now. Signed-off-by: Derrick Stolee <derrickstolee@xxxxxxxxxx> --- t/t5502-quickfetch.sh | 2 +- t/test-lib.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh index b160f8b7fb7..0c4aadebae6 100755 --- a/t/t5502-quickfetch.sh +++ b/t/t5502-quickfetch.sh @@ -122,7 +122,7 @@ test_expect_success 'quickfetch should not copy from alternate' ' ' -test_expect_success 'quickfetch should handle ~1000 refs (on Windows)' ' +test_expect_success PACKED_REFS_V1 'quickfetch should handle ~1000 refs (on Windows)' ' git gc && head=$(git rev-parse HEAD) && diff --git a/t/test-lib.sh b/t/test-lib.sh index 6db377f68b8..a244cd75c06 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1954,3 +1954,7 @@ test_lazy_prereq FSMONITOR_DAEMON ' git version --build-options >output && grep "feature: fsmonitor--daemon" output ' + +test_lazy_prereq PACKED_REFS_V1 ' + test "$GIT_TEST_PACKED_REFS_VERSION" -ne "2" +' \ No newline at end of file -- gitgitgadget