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

clarify git clone --local --shared --reference

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 4, 2007, 23:53 UTC
Message-ID
<4664A5FE.30208@nrlssc.navy.mil>

I think the goal of these three objects is space savings (and speed), but I don't understand when I should prefer one option over another, or when/whether to use a combination of them. And I am unsure (SCARED) about any side effects they may have.

This is all based on the information in git-clone.txt. If there is more detail someplace else please let me know.

1) What does local mean?
   --local says repository must be on the "local" machine and claims it
   attempts to make hardlinks when possible. Of course hard links cannot
   be created across filesystems, so are there other speedups/space
   savings when repository is on local machine but not on the same
   filesystem? Is this option still valid then?
2) Does --shared imply shared write access? Does --local?
    I'll point out that git-init has an option with the same name.
3) --shared seems like a special case of --reference? Are there
    differences?
4) what happens if the source repository dissappears? Is --local ok
    but --shared screwed?
4) is space savings obtained only at initial clone? or is it on going?
    does a future git pull from the source repository create new hard
    links where possible?

Can --shared be used with --reference. Can --reference be used multiple times (and would I want to). Does -l with -s get you anything? (the examples use this)

thanks, -brandon

Next: Shawn O. Pearce
Message 1 of 10 in “clarify git clone --local --shared --reference”
  1. Brandon CaseyJun 4, 2007
  2. Shawn O. PearceJun 5, 2007
  3. Brandon CaseyJun 5, 2007
  4. Shawn O. PearceJun 6, 2007
  5. Brandon CaseyJun 6, 2007
  6. Brandon CaseyJun 6, 2007
  7. Shawn O. PearceJun 8, 2007
  8. Loeliger Jon-LOELIGERJun 8, 2007
  9. Brandon CaseyJun 8, 2007
  10. Brandon CaseyJun 13, 2007

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.