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

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

From
JPJames Pickens <jepicken@gmail.com>
Date
Jan 31, 2009, 21:43 UTC
Message-ID
<885649360901311343r2a9bd1b5l5f8226218000dbe8@mail.gmail.com>
In-Reply-To
<m3tz7fw5ek.fsf@localhost.localdomain>
On Sat, Jan 31, 2009 at 2:08 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 8 quoted lines
> James Pickens <jepicken@gmail.com> writes:
>
>> So, is there any reason 'git clone' shouldn't automatically use
>> the alternates that it copied into the new repository?  I might
>> look into writing a patch if nobody objects.
>
> Alternates are fragile with respect to garbage collecting in the
> repository you borrow objects from.

I think that's irrelevant in this case. The scenario is that I clone repo A, which is borrowing objects from repo B. So repo A was already assuming that it's safe to borrow from B.

The current behavior is that the clone of A also borrows from B automatically. What I am asking is whether 'git clone' should take advantage of that to avoid copying redundant objects from A into the clone. They will get deleted the first time I run 'git gc' in the clone anyways.

James
Previous: Jakub NarebskiNext: Jeff King
Message 5 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.