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

Re: [PATCH v3] quickfetch(): Prevent overflow of the rev-list command line

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 9, 2009, 14:21 UTC
Message-ID
<4A55FCD5.2020908@viscovery.net>
In-Reply-To
<200907091552.44545.johan@herland.net>
Johan Herland schrieb:
Show 5 quoted lines
> On Thursday 09 July 2009, Johannes Sixt wrote:
>> Shouldn't you reset signal(SIGPIPE) to its previous value?
> 
> Done (provided that the sigchain_push/pop infrastructure works the way
> I expect).
I'm not sure, either. Peff?
Show 19 quoted lines
> +test_expect_success 'quickfetch should handle ~1000 refs (on Windows)' '
> +
> +	git gc &&
> +	head=$(git rev-parse HEAD) &&
> +	branchprefix="$head refs/heads/branch" &&
> +	for i in 0 1 2 3 4 5 6 7 8 9; do
> +		for j in 0 1 2 3 4 5 6 7 8 9; do
> +			for k in 0 1 2 3 4 5 6 7 8 9; do
> +				echo "$branchprefix$i$j$k" >> .git/packed-refs
> +			done
> +		done
> +	done &&
> +	(
> +		cd cloned &&
> +		git fetch &&
> +		git fetch
> +	)
> +
> +'

This test fails on Windows without the code change and passes with the code change. So, it's a good test.

But actually I meant you to make a test that triggers the SIGPIPE that would kill git-fetch if it were not ignored. This one doesn't trigger it, either.

-- Hannes
Previous: Johan HerlandNext: Jeff King
Message 15 of 28 in “msysgit git-submodule: "Unable to fetch in submodule path ..."”
  1. Peter KreftingJun 18, 2009
  2. Peter KreftingJun 22, 2009
  3. quickfetch(): Prevent overflow of the rev-list command lineJohan Herland, Jul 8, 2009
  4. Johannes SixtJul 8, 2009
  5. Johan HerlandJul 8, 2009
  6. Junio C HamanoJul 8, 2009
  7. Johan HerlandJul 9, 2009
  8. Alex RiesenJul 9, 2009
  9. Johannes SixtJul 9, 2009
  10. Johan HerlandJul 9, 2009
  11. Johannes SixtJul 9, 2009
  12. quickfetch(): Prevent overflow of the rev-list command lineJohan Herland, Jul 9, 2009
  13. Johannes SixtJul 9, 2009
  14. quickfetch(): Prevent overflow of the rev-list command lineJohan Herland, Jul 9, 2009
  15. Johannes SixtJul 9, 2009
  16. Jeff KingJul 9, 2009
  17. quickfetch(): Prevent overflow of the rev-list command lineJohan Herland, Jul 9, 2009
  18. Johannes SixtJul 9, 2009
  19. quickfetch(): Prevent overflow of the rev-list command lineJohan Herland, Jul 9, 2009
  20. Junio C HamanoJul 11, 2009
  21. Johan HerlandJul 11, 2009
  22. Johan HerlandJul 9, 2009
  23. Johannes SixtJul 9, 2009
  24. Johan HerlandJul 9, 2009
  25. Johannes SixtJul 9, 2009
  26. Alex RiesenJul 9, 2009
  27. Johan HerlandJul 9, 2009
  28. Alex RiesenJul 9, 2009

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.