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

Re: [PATCH 3/3] {fetch,upload}-pack: allow --depth=0 for infinite depth

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 22, 2010, 22:51 UTC
Message-ID
<AANLkTi=2rYmFutiPU3ZuBbEEivPy4g_1kzzc_QYuMgvN@mail.gmail.com>
In-Reply-To
<201008210011.40236.jnareb@gmail.com>
On Sat, Aug 21, 2010 at 8:11 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 17 quoted lines
> On Fri, 20 Aug 2010, Nguyễn Thái Ngọc Duy wrote:
>
>> diff --git a/Documentation/fetch-options.txt
>> b/Documentation/fetch-options.txt
>> index 9333c42..a22d839 100644
>> --- a/Documentation/fetch-options.txt
>> +++ b/Documentation/fetch-options.txt
>> @@ -10,7 +10,8 @@
>>  --depth=<depth>::
>>       Deepen the history of a 'shallow' repository created by
>>       `git clone` with `--depth=<depth>` option (see linkgit:git-clone[1])
>> -     by the specified number of commits.
>> +     by the specified number of commits. Specify "inf" for
>> +     infinite depth.
>
> It should probably be 'Specify 0 or "inf" for infinite (unlimited) depth',
> which means making repository non-shallow.

It would say "... which _may_ make the repository non-shallow". Or I have to redo the patch and make sure tags are fetched automatically too. Hmm..

Show 14 quoted lines
>>  ifndef::git-pull[]
>>  --dry-run::
>> diff --git a/Documentation/git-fetch-pack.txt
>> b/Documentation/git-fetch-pack.txt
>> index 4a8487c..75e4669 100644
>> --- a/Documentation/git-fetch-pack.txt
>> +++ b/Documentation/git-fetch-pack.txt
>> @@ -70,6 +70,7 @@ OPTIONS
>>
>>  --depth=<n>::
>>       Limit fetching to ancestor-chains not longer than n.
>> +     Specify 0 for infinite depth.
>
> Again '0 or "inf"'.

OK. "inf" was intented for user pleasure, which was the reason I did not implement it in git-fetch-pack (a plumbing). But Jonathan was brave enough to make OPT_INT_INF, I'll rebase this series on that patch.

-- 
Duy
Previous: Jakub NarebskiNext: Junio C Hamano
Message 5 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.