Thread (18 messages) flat view 18 messages, 5 authors, 2016-06-15

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

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:47:02

Johan Herland schrieb:
On Thursday 09 July 2009, Johannes Sixt wrote:
quoted
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?
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help