[PATCH 24/30] t5312: allow packed-refs v2 format
- From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Nov 7, 2022, 18:35 UTC
- Message-ID
- <191ad7fdef6880738c25c307bbc3c1d66b6378b5.1667846165.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1408.git.1667846164.gitgitgadget@gmail.com>
From: Derrick Stolee <derrickstolee@github.com>
One test in t5312 uses 'grep' to detect that a ref is written in the packed-refs file instead of a loose object. This does not work when the packed-refs file is in v2 format, such as when GIT_TEST_PACKED_REFS_VERSION=2.
Since the test already checks that the loose ref is missing, it suffices to check that 'git rev-parse' succeeds.
Signed-off-by: Derrick Stolee <derrickstolee@github.com> --- t/t3210-pack-refs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index 577f32dc71f..fe6c97d9087 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -159,7 +159,7 @@ test_expect_success 'delete ref while another dangling packed ref' ' test_expect_success 'pack ref directly below refs/' ' git update-ref refs/top HEAD && git pack-refs --all --prune && - grep refs/top .git/packed-refs && + git rev-parse refs/top && test_path_is_missing .git/refs/top '
-- gitgitgadget