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

Re: [PATCH 5/6 (v2)] upload-pack: send the HEAD information

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 2, 2008, 02:20 UTC
Message-ID
<7v1vwrqpvf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081202015924.GA6529@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
>   (1) If there are multiple symrefs to report, we have to keep
>       re-sending the server capabilities (I think you mentioned this in
>       the subthread with Shawn).
This is nothing new, so there is nothing to complain about here.

The ref advertisement section is not very extensible to begin with and we should consider ourselves lucky that Sergey Vlasov found the hole (cf. $gmane/10710) we are exploiting to carry "server capabilities"; I do not think we should nor can stuff any more than absolute minimum in the section.

Show 7 quoted lines
>   (3) If HEAD doesn't point to a valid object, we have no place to put
>       the symref. Or is it kosher to say
>
>         0000000000000000000000000000000000000000 HEAD\0...\0refs/heads/master
>
>       ? I think it would be nice eventually to be able to clone a HEAD
>       pointing to yet-to-be-born branch.

I think sending 0{40} would break older clients, but older clients cannot clone from an empty repository anyway, so that should not be so bad. I however do not think it is such a big thing to be able to clone void anyway.

You just have to train yourself to announce that your repository is clonable _after_ making it actually clonable.

Previous: Jeff KingNext: Jeff King
Message 14 of 17 in “Detecting HEAD more reliably while cloning”
  1. 0/6 Detecting HEAD more reliably while cloningJunio C Hamano, Dec 1, 2008
  2. 1/6 get_remote_heads(): refactor code to read "server capabilities"Junio C Hamano, Dec 1, 2008
  3. 2/6 connect.c::read_extra_info(): prepare to receive more than server capabilitiesJunio C Hamano, Dec 1, 2008
  4. 3/6 connect.c::read_extra_info(): find where HEAD points atJunio C Hamano, Dec 1, 2008
  5. 4/6 clone: find the current branch more explicitlyJunio C Hamano, Dec 1, 2008
  6. 5/6 upload-pack: send the HEAD informationJunio C Hamano, Dec 1, 2008
  7. 6/6 clone: test the new HEAD detection logicJunio C Hamano, Dec 1, 2008
  8. Jakub NarebskiDec 1, 2008
  9. Shawn O. PearceDec 1, 2008
  10. Junio C HamanoDec 1, 2008
  11. Jeff KingDec 1, 2008
  12. Junio C HamanoDec 2, 2008
  13. Jeff KingDec 2, 2008
  14. Junio C HamanoDec 2, 2008
  15. Jeff KingDec 2, 2008
  16. Johannes SixtDec 1, 2008
  17. Junio C HamanoDec 2, 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.