Re: Clone fails on a repo with too many heads/tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.03.2012 03:44, Jeff King wrote:
On Mon, Mar 19, 2012 at 08:30:38AM +0700, Nguyen Thai Ngoc Duy wrote:

On Mon, Mar 19, 2012 at 2:07 AM, Jeff King <peff@xxxxxxxx> wrote:
I don't think that will work, as stateless-rpc fetch-pack already uses
stdin to receive the list of advertised refs from the remote. Nor would
you want to have multiple invocations of fetch-pack, since that would
mean multiple http requests and multiple pack responses (which could not
delta between themselves).
remote-curl functions as middle man between http client and
fetch-pack. Can we just send ref list over fetch-pack.stdin first,
followed by maybe empty line, then normal stuff that remote-curl feeds
fetch-pack?

Yes, I think that would work. You'd just have to take care to pass the
residual buffer (i.e., what is left in your input buffer after you
notice that reading the list of wanted refs is finished) along to
the git-protocol code.  So it would require a little refactoring of
get_remote_heads, I think.

Would it be OK for fetch-pack.c to use the packetized format (pkt-line.h) for reading the list of refs from stdin?

This way we can read() the exact number of bytes needed for the refs from the fd and there would be no need to refactor get_remote_heads() to pass a residual buffer, it could just continue reading straight from the same fd.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]