Re: [PATCH 3/3] t: detect and signal failure within loop
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 22, 2022, 20:22 UTC
- Message-ID
- <xmqqwnb0av09.fsf@gitster.g>
- In-Reply-To
- <31a962fd5070d68964e545fb5506d795e8845ec3.1661192802.git.gitgitgadget@gmail.com>
"Eric Sunshine via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 13 quoted lines
> diff --git a/t/t5329-pack-objects-cruft.sh b/t/t5329-pack-objects-cruft.sh
> index 8968f7a08d8..6049e2c1d78 100755
> --- a/t/t5329-pack-objects-cruft.sh
> +++ b/t/t5329-pack-objects-cruft.sh
> @@ -29,7 +29,7 @@ basic_cruft_pack_tests () {
> while read oid
> do
> path="$objdir/$(test_oid_to_path "$oid")" &&
> - printf "%s %d\n" "$oid" "$(test-tool chmtime --get "$path")"
> + printf "%s %d\n" "$oid" "$(test-tool chmtime --get "$path")" || exit 1
> done |
> sort -k1
> ) >expect &&With the loop being on the upstream of a pipe, does the added "exit 1" have any effect?
Everything else in these three patches looked very sensible, but this one I found questionable.
Thanks.