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

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:02

Johan Herland [off-list ref] writes:
quickfetch() calls rev-list to check whether the objects we are about to
fetch are already present in the repo (if so, we can skip the object fetch).
However, when there are many (~1000) refs to be fetched, the rev-list
command line grows larger than the maximum command line size on some systems
(32K in Windows). This causes rev-list to fail, making quickfetch() return
non-zero, which unnecessarily triggers the transport machinery. This somehow
causes fetch to fail with an exit code.

By using the --stdin option to rev-list (and feeding the object list to its
standard input), we prevent the overflow of the rev-list command line,
which causes quickfetch(), and subsequently the overall fetch, to succeed.
I feel uneasy with that "somehow" at the end of the first paragraph, but
nevertheless this is the right thing to do.  Since it is a very isolated
change, I'd queue this directly on 'master' and see if anybody notices a
breakage, as it would be relatively pain-free to revert if it turns out to
be necessary.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help