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

Re: 'git clone' doesn't use alternates automatically?

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2009, 01:19 UTC
Message-ID
<7v7i4b2bto.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090131215514.GB9415@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
>   - without either, copy alternates from origin, but _don't_ use
>     alternates while cloning

Are you talking about a local clone optimization that does hardlink from the source repository?

I am fairly certain that copying alternates from the source repository was not an intended behaviour but was a consequence of lazy coding of how we copy (or link) everything from it. The original was literally the simple matter of:

    find objects ! -type d -print | cpio $cpio_quiet_flag -pumd$l "$GIT_DIR/"

whose intention was to copy objects/?? and objects/pack/. and it wasn't even part of the design consideration to worry about what would happen to the alternates the source repository might have in objects/info/.

Previous: Jeff KingNext: Jeff King
Message 7 of 13 in “'git clone' doesn't use alternates automatically?”
  1. James PickensJan 30, 2009
  2. Jeff KingJan 31, 2009
  3. James PickensJan 31, 2009
  4. Jakub NarebskiJan 31, 2009
  5. James PickensJan 31, 2009
  6. Jeff KingJan 31, 2009
  7. Junio C HamanoFeb 1, 2009
  8. Jeff KingFeb 2, 2009
  9. Junio C HamanoFeb 3, 2009
  10. Jeff KingFeb 3, 2009
  11. Junio C HamanoFeb 1, 2009
  12. James PickensFeb 1, 2009
  13. Junio C HamanoFeb 1, 2009

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.