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

Re: git clone -l

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Mar 5, 2008, 00:53 UTC
Message-ID
<47CDEF11.8000807@nrlssc.navy.mil>
In-Reply-To
<7vd4qa3t9t.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 17 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
>> What, exactly, is -l supposed to do for clone? As far as I can tell, we 
>> automatically do the local magic if we can. Would it be okay to make 
>> "local" default to "if possible", have "-l" mean error if not possible, 
>> and have "--no-local" able to avoid using local magic even if we could use 
>> it?
> 
> It used to be that "-l" meant "When it is local, use hardlink if possible
> otherwise copy without complaining, as either are cheaper than the pack
> piped to unpack."  Lack of -l meant no local magic.
> 
> Recently lack of -l stopped to mean "no local magic".  We still do the
> local magic, but we do not do hardlinks and instead do copies.  An "-l"
> that asks clone across filesystems still falls back to copying but now
> gets a warning.  "--no-hardlinks" does not have any significance anymore,
> as that is what you would get for a local clone without -l.

Are you sure? I thought this was changed by 3d5c418f so that hardlinking is done by default.

  Lack of -l means "do local magic and use hard links".
  Using -l makes git-clone print a warning when hard linking fails.
  --no-hardlinks disables hard linking and still does local magic.
-brandon
Previous: Daniel Barkalow
Message 4 of 4 in “git clone -l”
  1. Daniel BarkalowMar 5, 2008
  2. Junio C HamanoMar 5, 2008
  3. Daniel BarkalowMar 5, 2008
  4. Brandon CaseyMar 5, 2008

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.