Subject: Re: [PATCH] t3700: avoid suppressing git's exit code

From: Johannes Sixt <[email-masked]>
Date: Sat, 28 Feb 2026 09:12:46 +0100

Am 27.02.26 um 17:51 schrieb Siddharth Shrimali:
> @@ -536,9 +544,9 @@ test_expect_success 'all statuses changed in folder if . is given' '
>  		touch x y z sub/a sub/dir/b &&
>  		git add -A &&
>  		git add --chmod=+x . &&
> -		test $(git ls-files --stage | grep ^100644 | wc -l) -eq 0 &&
> +		test $(git ls-files --stage >actual && grep ^100644 actual | wc -l) -eq 0 &&
>  		git add --chmod=-x . &&
> -		test $(git ls-files --stage | grep ^100755 | wc -l) -eq 0
> +		test $(git ls-files --stage >actual && grep ^100755 actual | wc -l) -eq 0

This doesn't help. The exit code of $( ) that is substituted into a
command is ignored, too. You must move the git invocation out of the
subshell.

>  	)
>  '
>  
> @@ -574,4 +582,4 @@ test_expect_success CASE_INSENSITIVE_FS 'path is case-insensitive' '
>  	git add "$downcased"
>  '
>  
> -test_done
> +test_done
> \ No newline at end of file

Please keep the newline at the end of file.

-- Hannes