From: Siddharth Shrimali Date: Sat, 28 Feb 2026 10:15:11 GMT Subject: Re: [PATCH] t3700: avoid suppressing git's exit code Message-ID: In-Reply-To: <3c854150-2efc-4f5b-8a75-bb40808babd0@kdbg.org> Hi Hannes, Thank you for the review! It looks like our emails crossed paths; I sent out a v2 [1] just before your comments arrived. In that version, I have addressed both of your points: 1. Moved the git invocations out of the subshells and replaced the logic with 'test_grep !' to properly catch exit codes. 2. Restored the trailing newline at the end of the file. [1] https://lore.kernel.org/git/20260228070020.89668-1-r.siddharth.shrimali@gmail.com/ Best regards, Siddharth On Sat, 28 Feb 2026 at 13:42, Johannes Sixt wrote: > > 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 >