From: Kacper Kornet Date: Thu, 21 Jul 2011 20:04:55 GMT Subject: Re: git fetch --all --depth Message-ID: <20110721200455.GC11520@camk.edu.pl> 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 writes: > > I have just discovered that when I use: > > git fetch --all --depth= > > 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= is not "deepen by ", but "make sure I have at least > 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 , as you cannot guess what the right > value of 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 -- Kacper Kornet