Re: [PATCH v2 1/2] t0001-t0028: avoid pipes with Git on LHS
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Feb 27, 2022, 17:43 UTC
- Message-ID
- <177b8b40-9e27-5019-c4df-772642508c37@kdbg.org>
- In-Reply-To
- <20220227122453.25278-2-shivam828787@gmail.com>
Am 27.02.22 um 13:24 schrieb Shubham Mishra:
> diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh > index b007f0efef..b5fa76059b 100755 > --- a/t/t0000-basic.sh > +++ b/t/t0000-basic.sh
Show 11 quoted lines
> @@ -1104,12 +1105,13 @@ test_expect_success 'very long name in the index handled sanely' ' > >path4 && > git update-index --add path4 && > ( > - git ls-files -s path4 | > - sed -e "s/ .*/ /" | > + git ls-files -s path4 >tmp && > + sed -e "s/ .*/ /" tmp | > tr -d "\012" && > echo "$a" > ) | git update-index --index-info &&
We see a pipe here, and in the upstream of that pipe is a git invocation. That should be fixed, too. After the rewrite that you already did here, it should be sufficient to move the git invocation before the parentheses.
Show 5 quoted lines
> - len=$(git ls-files "a*" | wc -c) && > + git ls-files "a*" >tmp && > + len=$(wc -c <tmp) && > test $len = 4098 > '
-- Hannes