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

'git clone' doesn't use alternates automatically?

From
JPJames Pickens <jepicken@gmail.com>
Date
Jan 30, 2009, 22:12 UTC
Message-ID
<885649360901301412jd5c6b0dne1eff1ff00dd043e@mail.gmail.com>
Hi,

I have a central, shared Git repository on an NFS drive at path $central. I have added "$central/objects" to $central/objects/info/alternates. I see that when I clone this repository with Git 1.6.1, the alternates file is automatically copied to the clone, but so are all the pack files and loose objects. If I then cd to the clone and run 'git gc', it removes the redundant local objects.

I thought I tested this setup a few months back, and 'git clone' automatically used the alternates file to avoid copying the redundant objects into the clone. Has this behavior changed, or is my memory bad?

James
Next: Jeff King
Message 1 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.