t/t5313-pack-bounds-checks.sh: prepare for sub-directories

Prepare for sub-directories to appear in $GIT_DIR/objects/pack by adjusting the copy, remove, and chmod invocations to perform their behavior recursively. This prepares us for the new $GIT_DIR/objects/pack/multi-pack-index.d directory which will be added in a following commit. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Taylor Blau committed Aug 6, 2024 at 11:38 UTC 147c3f6740773d0cf9095ad9fd7c68f1c1348c9a
1 file changed +4 -4
t/t5313-pack-bounds-checks.sh
+4 -4
@@ -7,11 +7,11 @@ TEST_PASSES_SANITIZE_LEAK=true
7
8 clear_base () {
9 test_when_finished 'restore_base' &&
10 - rm -f $base
10 + rm -r -f $base
11 }
12
13 restore_base () {
14 - cp base-backup/* .git/objects/pack/
14 + cp -r base-backup/* .git/objects/pack/
15 }
16
17 do_pack () {
@@ -64,9 +64,9 @@ test_expect_success 'set up base packfile and variables' '
64 git commit -m base &&
65 git repack -ad &&
66 base=$(echo .git/objects/pack/*) &&
67 - chmod +w $base &&
67 + chmod -R +w $base &&
68 mkdir base-backup &&
69 - cp $base base-backup/ &&
69 + cp -r $base base-backup/ &&
70 object=$(git rev-parse HEAD:file)
71 '
72