git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Shubham MishraNext: Shubham Mishra
Message 9 of 19 in “Subject: [PATCH 0/2] [GSoC][PATCH 0/2] t0000-t0050: avoid pipes with Git on LHS”
  1. 0/2 Subject: [PATCH 0/2] [GSoC][PATCH 0/2] t0000-t0050: avoid pipes with Git on LHSShubham Mishra, Feb 24, 2022
  2. 1/2 t0001-t0028: avoid pipes with Git on LHSShubham Mishra, Feb 24, 2022
  3. 2/2 t0030-t0050: avoid pipes with Git on LHSShubham Mishra, Feb 24, 2022
  4. Ævar Arnfjörð BjarmasonFeb 24, 2022
  5. Shubham MishraFeb 26, 2022
  6. Taylor BlauFeb 26, 2022
  7. [GSoC] [PATCH v2 0/2] avoid pipes with Git on LHSShubham Mishra, Feb 27, 2022
  8. 1/2 t0001-t0028: avoid pipes with Git on LHSShubham Mishra, Feb 27, 2022
  9. Johannes SixtFeb 27, 2022
  10. Shubham MishraMar 3, 2022
  11. 2/2 t0030-t0050: avoid pipes with Git on LHSShubham Mishra, Feb 27, 2022
  12. Johannes SixtFeb 27, 2022
  13. Shubham MishraFeb 24, 2022
  14. Taylor BlauFeb 26, 2022
  15. [GSoC] [PATCH v3 0/2] avoid pipes with Git on LHSShubham Mishra, Mar 12, 2022
  16. 1/2 t0001-t0028: avoid pipes with Git on LHSShubham Mishra, Mar 12, 2022
  17. 2/2 t0030-t0050: avoid pipes with Git on LHSShubham Mishra, Mar 12, 2022
  18. Johannes SixtMar 12, 2022
  19. Shubham MishraMar 12, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.