Re: [PATCH v2 1/2] t0001-t0028: avoid pipes with Git on LHS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

> -	len=$(git ls-files "a*" | wc -c) &&
> +	git ls-files "a*" >tmp &&
> +	len=$(wc -c <tmp) &&
>  	test $len = 4098
>  '

-- Hannes



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux