summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-11-07 18:35:58 +0000
committerTaylor Blau <me@ttaylorr.com>2022-11-07 13:53:53 -0500
commita353be4b08564c92d8144665d04ed5ca0a6211f9 (patch)
tree16751b2a6b94e32da7f72e326ac9edd583d9d717
parentaf6a67784677e2fa20665a6ecdc18d389091e2d6 (diff)
downloadgit-a353be4b08564c92d8144665d04ed5ca0a6211f9.tar.gz
t5312: allow packed-refs v2 format
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> Signed-off-by: Taylor Blau <me@ttaylorr.com>
-rwxr-xr-xt/t3210-pack-refs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 577f32dc71..fe6c97d908 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
'