[PATCH 24/30] t5312: allow packed-refs v2 format
From: Derrick Stolee via GitGitGadget <hidden>
Date: 2022-11-07 18:37:48
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Derrick Stolee via GitGitGadget <hidden>
Date: 2022-11-07 18:37:48
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Derrick Stolee <redacted> 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 <redacted> --- 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