Re: Symbolic refs break ref advertisement on 1.8.4.3+

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

 



On Sun, Nov 17, 2013 at 01:39:52AM +1100, Bryan Turner wrote:

> Aphrael:example bturner$ for ((i=1;i<21;i++)); do git symbolic-ref
> refs/heads/syms/$i refs/heads/master; done
> Aphrael:example bturner$ git ls-remote .
> fatal: protocol error: impossibly long line
> fatal: Could not read from remote repository.
> 
> A symref= entry is written into the first packet of the ref
> advertisement, right after the capabilities, for each symbolic ref in
> the repository. Unfortunately, no splitting is done on that value and
> so once you have 15-20 symbolic refs (more or less depending on path
> lengths), you blow the 996 byte limit in format_packet (pkt-line.c)
> and all further clone/fetch operations fail.

Ick, yeah. I don't think there is a way around that with the way the
information is shoe-horned into the protocol.  We should probably just
revert 5e7dcad (upload-pack: send non-HEAD symbolic refs, 2013-09-17),
and assume the HEAD branch name is short enough to fit.

Another option would be to cap the number of non-HEAD symrefs we'd send
(by counting up the bytes and keeping below the limit). That at least
makes the "easy" cases work, but it's a bit too flaky for my taste.

-Peff
--
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]