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

Re: [PATCH 1/2] clone: do not ignore --no-hardlinks

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 27, 2009, 07:24 UTC
Message-ID
<7vy6vsmjeo.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090227025829.GA22060@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Fri, Feb 27, 2009 at 12:31:22AM +0100, Johannes Schindelin wrote:
>
>> Somehow --no-hardlinks got broken by making clone a builtin.  This
>> was discovered during my work on --depth being ignored for local
>> clones.
>> 
>> There will be a test case that tests for --no-hardlinks in conjunction
>> with --depth, so this patch is not accompanied by a separate test.
>
> Hmm. But --no-hardlinks has an effect later, in copy_or_link_directory,
> making it just do a copy. So it _does_ work, just not in the way you
> expect.
Yup, I agree.
> I think to turn off local shortcuts entirely, --no-local would probably
> make more sense. IOW, something like this:
So across filesystems:
 - "git clone /p/a/t/h" falls back to copying;
 - "git clone --local /p/a/t/h" should fail without falling back to
   copying; and
 - "git clone --no-local /p/a/t/h" should work as if file:///p/a/t/h
   was given.

That is much more sensible than making "git clone --no-hardlinks /p/a/t/h" imply more than what the option really means: we are making a local copy but do not cheat with hardlinking.

Previous: Jeff KingNext: Junio C Hamano
Message 8 of 13 in “clone: ignore --depth when cloning locally (implicitly --local)”
  1. clone: ignore --depth when cloning locally (implicitly --local)Johannes Schindelin, Feb 26, 2009
  2. Junio C HamanoFeb 26, 2009
  3. Johannes SchindelinFeb 26, 2009
  4. 0/2 shallow clone stuffJohannes Schindelin, Feb 26, 2009
  5. Junio C HamanoFeb 27, 2009
  6. 1/2 clone: do not ignore --no-hardlinksJohannes Schindelin, Feb 26, 2009
  7. Jeff KingFeb 27, 2009
  8. Junio C HamanoFeb 27, 2009
  9. Junio C HamanoFeb 27, 2009
  10. Junio C HamanoFeb 27, 2009
  11. Daniel BarkalowFeb 27, 2009
  12. Jeff KingFeb 27, 2009
  13. 2/2 clone: ignore --depth when cloning locally (implicitly --local)Johannes Schindelin, Feb 26, 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.