Re: [PATCH] send-pack: do not give up when remote has insanely large number of refs.
- From
- Stephen C. Tweedie <sct@redhat.com>
- Date
- Feb 22, 2006, 18:30 UTC
- Message-ID
- <1140633034.3385.5.camel@orbit.scot.redhat.com>
- In-Reply-To
- <7v1wxvsovj.fsf_-_@assigned-by-dhcp.cox.net>
Hi,
On Wed, 2006-02-22 at 01:51 -0800, Junio C Hamano wrote:
> + for (ref = refs, j = i + 16; > + i < 900 && i < j && ref;
Looks like it's now sending just 16 additional negative refs instead of 940 for this repo. Definitely an improvement --- push (both full and with an explicit refspec) is now working properly, thanks!
Adding more ^refs up to the limit of 900 should be possible, too, and should catch more already-present objects --- while the refs count for this repo was under 900, push still worked fine for me, so we don't necessarily have to cut it hard to as low a number as 16.
Perhaps ultimately we may want to simply send the refs list to git-rev-list via a pipe or similar if we want this to scale? We'll need this for edge cases such as sending >900 new tags to an old repository at once, as we'll exhaust the size of the positive refs list in that case.
Thanks again, Stephen