Skip to content

Commit 2509d01

Browse files
committed
Merge branch 'ab/t5314-avoid-losing-exit-status' into maint-2.39
Test fix. * ab/t5314-avoid-losing-exit-status: t5314: check exit code of "git"
2 parents 5a8f4c8 + 243caa8 commit 2509d01

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

t/t5314-pack-cycle-detection.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,16 @@ TEST_PASSES_SANITIZE_LEAK=true
6363
# Note that the two variants of "file" must be similar enough to convince git
6464
# to create the delta.
6565
make_pack () {
66-
{
67-
printf '%s\n' "-$(git rev-parse $2)"
68-
printf '%s dummy\n' "$(git rev-parse $1:dummy)"
69-
printf '%s file\n' "$(git rev-parse $1:file)"
70-
} |
71-
git pack-objects --stdout |
72-
git index-pack --stdin --fix-thin
66+
ln1=$(git rev-parse "$2") &&
67+
ln2=$(git rev-parse "$1:dummy") &&
68+
ln3=$(git rev-parse "$1:file") &&
69+
cat >list <<-EOF
70+
-$ln1
71+
$ln2 dummy
72+
$ln3 file
73+
EOF
74+
git pack-objects --stdout <list >pack &&
75+
git index-pack --stdin --fix-thin <pack
7376
}
7477

7578
test_expect_success 'setup' '

0 commit comments

Comments
 (0)