Subject: Re: [PATCH 3/3] t: detect and signal failure within loop

From: Junio C Hamano <[email-masked]>
Date: Mon, 22 Aug 2022 13:22:30 -0700

"Eric Sunshine via GitGitGadget" <[email-masked]> writes:

> 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.