From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Bryan Turner <bturner@atlassian.com>, Git Users <git@vger.kernel.org>
Subject: Re: Symbolic refs break ref advertisement on 1.8.4.3+
Date: Mon, 18 Nov 2013 10:16:32 -0800 [thread overview]
Message-ID: <xmqqr4adbmnz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131117100251.GB22166@sigill.intra.peff.net> (Jeff King's message of "Sun, 17 Nov 2013 05:02:51 -0500")
Jeff King <peff@peff.net> writes:
> 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.
Thanks Bryan for an easy reproduction, and thanks Peff for a
suggestion. Let's revert that one for now.
prev parent reply other threads:[~2013-11-18 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 14:39 Symbolic refs break ref advertisement on 1.8.4.3+ Bryan Turner
2013-11-17 10:02 ` Jeff King
2013-11-18 18:16 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr4adbmnz.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=bturner@atlassian.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).