Merge branch 'ab/t5314-avoid-losing-exit-status'

Test fix.

* ab/t5314-avoid-losing-exit-status:
  t5314: check exit code of "git"
This commit is contained in:
Junio C Hamano 2022-12-19 11:46:13 +09:00
commit d2caf09d00

View File

@ -63,13 +63,16 @@ TEST_PASSES_SANITIZE_LEAK=true
# Note that the two variants of "file" must be similar enough to convince git # Note that the two variants of "file" must be similar enough to convince git
# to create the delta. # to create the delta.
make_pack () { make_pack () {
{ ln1=$(git rev-parse "$2") &&
printf '%s\n' "-$(git rev-parse $2)" ln2=$(git rev-parse "$1:dummy") &&
printf '%s dummy\n' "$(git rev-parse $1:dummy)" ln3=$(git rev-parse "$1:file") &&
printf '%s file\n' "$(git rev-parse $1:file)" cat >list <<-EOF
} | -$ln1
git pack-objects --stdout | $ln2 dummy
git index-pack --stdin --fix-thin $ln3 file
EOF
git pack-objects --stdout <list >pack &&
git index-pack --stdin --fix-thin <pack
} }
test_expect_success 'setup' ' test_expect_success 'setup' '