aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-02-14 14:15:53 -0800
committerJunio C Hamano <gitster@pobox.com>2023-02-14 14:15:53 -0800
commit2509d0198ce3d38408c1fee2efabc9a861933122 (patch)
tree9e27a1bb1a7bdf1fe732b46144bd3fcef5888b0f
parent5a8f4c8adc4465de83fccaef79780e29394c7456 (diff)
parent243caa898284413c2e53388787c8c6b599b91fb4 (diff)
downloadgit-2509d0198ce3d38408c1fee2efabc9a861933122.tar.gz
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"
-rwxr-xr-xt/t5314-pack-cycle-detection.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/t/t5314-pack-cycle-detection.sh b/t/t5314-pack-cycle-detection.sh
index 73a241743a..82734b9a3c 100755
--- a/t/t5314-pack-cycle-detection.sh
+++ b/t/t5314-pack-cycle-detection.sh
@@ -63,13 +63,16 @@ TEST_PASSES_SANITIZE_LEAK=true
# Note that the two variants of "file" must be similar enough to convince git
# to create the delta.
make_pack () {
- {
- printf '%s\n' "-$(git rev-parse $2)"
- printf '%s dummy\n' "$(git rev-parse $1:dummy)"
- printf '%s file\n' "$(git rev-parse $1:file)"
- } |
- git pack-objects --stdout |
- git index-pack --stdin --fix-thin
+ ln1=$(git rev-parse "$2") &&
+ ln2=$(git rev-parse "$1:dummy") &&
+ ln3=$(git rev-parse "$1:file") &&
+ cat >list <<-EOF
+ -$ln1
+ $ln2 dummy
+ $ln3 file
+ EOF
+ git pack-objects --stdout <list >pack &&
+ git index-pack --stdin --fix-thin <pack
}
test_expect_success 'setup' '