git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/5] upload-pack: implement protocol extension "symbolic-ref"

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 1, 2008, 14:03 UTC
Message-ID
<7vy6z0q9fm.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081130180214.GA10375@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> On Sun, Nov 30, 2008 at 01:57:29AM -0800, Junio C Hamano wrote:
> ...
>> This is unfortunate because it forces an extra round trip (receiving end
>> sends a "please tell me symbolic-ref" packet, and then upload side sends
>> "here are the requested information" packet), but it has to be implemented
>> this way because (1) ls-remote may need to ask for this information, in
>> which case there is no "want" to be sent; and (2) the transport API
>> insists that transport_get_remote_refs() returns the final list, and does
>> not allow augmenting what was initially obtained from the call to it by
>> later calls to transport_fetch_refs() easily.
>
> Hrm. For (1), could we allow either interaction method? IOW, allow
> requesting a symref on the first want line, _or_ by separate "symbolic
> ref" packet? That would allow clients who are using "want" to
> piggy-back the symref request as an optimization, but not restrict those
> that just want to ask for it?

I think I found another hole in the protocol that we can use to carry the "which branch does HEAD points at" information in a backward compatible way, and it would be a much less intrusive although more sneaky way. And it would not have to suffer from the above issues at all.

A patchset follows shortly...
Previous: Jeff King
Message 11 of 11 in “clone: test the new HEAD detection logic”
  1. 5/5 clone: test the new HEAD detection logicJunio C Hamano, Nov 30, 2008
  2. 4/5 upload-pack: implement protocol extension "symbolic-ref"Junio C Hamano, Nov 30, 2008
  3. 3/5 clone: find the current branch more explicitlyJunio C Hamano, Nov 30, 2008
  4. 2/5 get_remote_heads(): do not assume that the conversation is one-wayJunio C Hamano, Nov 30, 2008
  5. 1/5 upload-pack.c: refactor receive_needs()Junio C Hamano, Nov 30, 2008
  6. 0/5 Detecting HEAD more reliably while cloningJunio C Hamano, Nov 30, 2008
  7. Junio C HamanoNov 30, 2008
  8. Junio C HamanoDec 1, 2008
  9. Jeff KingNov 30, 2008
  10. Jeff KingNov 30, 2008
  11. Junio C HamanoDec 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.