From: Johannes Sixt Date: Sat, 28 Feb 2026 08:12:46 GMT Subject: Re: [PATCH] t3700: avoid suppressing git's exit code Message-ID: <3c854150-2efc-4f5b-8a75-bb40808babd0@kdbg.org> In-Reply-To: <20260227165143.70188-1-r.siddharth.shrimali@gmail.com> 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