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

Re: [PATCH 1/3] clone: do not accept --depth on local clones

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 21, 2010, 00:27 UTC
Message-ID
<7vwrrk95eg.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1282269067-5527-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> clone_local() function disregards --depth. Make it more apparent.
> Also hint users that file:// works with --depth.
Hmm---why?

The "--depth" option is an ugly hack that tries to conserve network bandwidth and disk usage, which is not necessary if you are doing a local hardlinking clone. Without this patch we allowed people to clone with the option without a downside (allowing it didn't result in broken repository, for example), but with it, what has long been allowed suddenly stops working. Is the breakage justifiable?

Previous: Junio C HamanoNext: Nguyen Thai Ngoc Duy
Message 7 of 8 in “clone: do not accept --depth on local clones”
  1. 1/3 clone: do not accept --depth on local clonesNguyễn Thái Ngọc Duy, Aug 20, 2010
  2. 2/3 fetch-pack: use args.shallow to detect shallow clone instead of args.depthNguyễn Thái Ngọc Duy, Aug 20, 2010
  3. 3/3 {fetch,upload}-pack: allow --depth=0 for infinite depthNguyễn Thái Ngọc Duy, Aug 20, 2010
  4. Jakub NarebskiAug 20, 2010
  5. Nguyen Thai Ngoc DuyAug 22, 2010
  6. Junio C HamanoAug 21, 2010
  7. Junio C HamanoAug 21, 2010
  8. Nguyen Thai Ngoc DuyAug 22, 2010

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.