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
# 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' '