git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kacper Kornet <kornet@camk.edu.pl>
To: Junio C Hamano <gitster@pobox.com>
Cc: Alex Neronskiy <zakmagnus@google.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: git fetch --all --depth
Date: Thu, 21 Jul 2011 22:04:55 +0200	[thread overview]
Message-ID: <20110721200455.GC11520@camk.edu.pl> (raw)
In-Reply-To: <7v1uxj4ml4.fsf@alter.siamese.dyndns.org>

On Thu, Jul 21, 2011 at 09:36:55AM -0700, Junio C Hamano wrote:
> Kacper Kornet <kornet@camk.edu.pl> writes:

> > I have just discovered that when I use:

> > git fetch --all --depth=<n> 

> > the history is not deepened. Is the any specific reason for it or is it
> > a bug?

> The above is not specific enough to judge if you found a bug or if it is a
> user error.

To be more specific, the steps to reproduce:

$ git clone --depth=1 git://git.kernel.org/pub/scm/git/git.git
$ cd git
$ git fetch --depth 2 --all

and the last command does nothing, while

$ git fetch --depth 2 

deepens the clone by 2 repos, as expected.

> IIRC, --depth=<n> is not "deepen by <n>", but "make sure I have at least
> <n> from the updated tip(s)".  The shallow-clone hack gives you quite
> useless (even though it may be internally consistent) semantics if you
> shallow-cloned way in the past and fetched with --depth after the other
> side added many more commits than <n>, as you cannot guess what the right
> value of <n> should be without actually fetching without --depth.

That is true. Also, from esthetic point of view, sometimes I miss the
functionality to deepen the full repository. For example git fetch
--depth 0 could do it. Now I have to do git fetch --depth
<very_large_number>

-- 
  Kacper Kornet

  reply	other threads:[~2011-07-21 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 22:39 git fetch --all --depth Kacper Kornet
2011-07-21 16:36 ` Junio C Hamano
2011-07-21 20:04   ` Kacper Kornet [this message]
2011-07-21 20:40     ` ZAK Magnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110721200455.GC11520@camk.edu.pl \
    --to=kornet@camk.edu.pl \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=zakmagnus@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).