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

Re: efficient cloning

From
Junio C Hamano <junkio@cox.net>
Date
Mar 21, 2006, 08:42 UTC
Message-ID
<7v4q1sgpet.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<441FB715.1000500@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 6 quoted lines
> That way the only extra dwimery would be to add "remotes" after
> "heads" under .git/refs and accept directory in .git/remotes/ as ref
> and tack on '/master' at the end of it as the last option to
> search. For a specific branch on an imported remote, one would have to
> say "jc/next". This means we still only handle 'master' specially so
> we don't introduce any new protected or special names.

Two things that holding me back from doing what you suggested are (1) "master" is just a convention and indeed non-negligible number of kernel.org trees have "test" and "release" instead without "master"; (2) I'd really really really want to avoid teaching get_sha1_basic() C-level about .git/remotes/$origin file, even though that function is more of a UI level than the rest of the really core C-level routines.

But if I were forced to choose between the above 2, I would probably pick defaulting to "master".

The reason I would like to avoid .git/remotes/$origin is because it is designed to be Porcelainish thing. The underlying C-level git-fetch-pack never sees it; instead the information fed to C-level is prepared by the upper layer using that file. As far as I understand, Cogito does not understand it either, except that it ships with bash completion code that reads from filenames there.

Previous: Andreas EricssonNext: Jeff King
Message 16 of 22 in “efficient cloning”
  1. James CloosMar 19, 2006
  2. Shawn PearceMar 19, 2006
  3. Junio C HamanoMar 19, 2006
  4. James CloosMar 20, 2006
  5. Junio C HamanoMar 20, 2006
  6. Junio C HamanoMar 20, 2006
  7. Petr BaudisMar 20, 2006
  8. Junio C HamanoMar 20, 2006
  9. Petr BaudisMar 20, 2006
  10. Junio C HamanoMar 20, 2006
  11. Josef WeidendorferMar 20, 2006
  12. Junio C HamanoMar 20, 2006
  13. Petr BaudisMar 20, 2006
  14. Junio C HamanoMar 20, 2006
  15. Andreas EricssonMar 21, 2006
  16. Junio C HamanoMar 21, 2006
  17. Jeff KingMar 21, 2006
  18. Junio C HamanoMar 21, 2006
  19. Petr BaudisMar 21, 2006
  20. Josef WeidendorferMar 21, 2006
  21. Junio C HamanoMar 21, 2006
  22. Junio C HamanoMar 21, 2006

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.