summaryrefslogtreecommitdiff
path: root/t/t6500-gc.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-08-24 15:32:39 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-08-24 15:32:39 -0700
commit276bc6357ebe50dae070aff9693a21c4a2bafc28 (patch)
treec49d20b358176aa2b94ebb3ccb89d35ac542d522 /t/t6500-gc.sh
parentMerge branch 'en/ort-perf-batch-15' (diff)
parentt6001: avoid direct file system access (diff)
downloadtgif-276bc6357ebe50dae070aff9693a21c4a2bafc28.tar.xz
Merge branch 'hn/refs-test-cleanup'
A handful of tests that assumed implementation details of files backend for refs have been cleaned up. * hn/refs-test-cleanup: t6001: avoid direct file system access t6500: use "ls -1" to snapshot ref database state t7064: use update-ref -d to remove upstream branch t1410: mark test as REFFILES t1405: mark test for 'git pack-refs' as REFFILES t1405: use 'git reflog exists' to check reflog existence t2402: use ref-store test helper to create broken symlink t3320: use git-symbolic-ref rather than filesystem access t6120: use git-update-ref rather than filesystem access t1503: mark symlink test as REFFILES t6050: use git-update-ref rather than filesystem access
Diffstat (limited to 't/t6500-gc.sh')
-rwxr-xr-xt/t6500-gc.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index 10c7ae7f09..c2021267f2 100755
--- a/t/t6500-gc.sh
+++ b/t/t6500-gc.sh
@@ -241,7 +241,7 @@ test_expect_success 'background auto gc respects lock for all operations' '
# create a ref whose loose presence we can use to detect a pack-refs run
git update-ref refs/heads/should-be-loose HEAD &&
- test_path_is_file .git/refs/heads/should-be-loose &&
+ (ls -1 .git/refs/heads .git/reftable >expect || true) &&
# now fake a concurrent gc that holds the lock; we can use our
# shell pid so that it looks valid.
@@ -258,7 +258,8 @@ test_expect_success 'background auto gc respects lock for all operations' '
# our gc should exit zero without doing anything
run_and_wait_for_auto_gc &&
- test_path_is_file .git/refs/heads/should-be-loose
+ (ls -1 .git/refs/heads .git/reftable >actual || true) &&
+ test_cmp expect actual
'
# DO NOT leave a detached auto gc process running near the end of the