git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git fetch --depth=* broken?
@ 2009-08-22  5:52 Nicolas Pitre
  2009-08-24  4:04 ` [PATCH] fix simple deepening of a repo Nicolas Pitre
  0 siblings, 1 reply; 22+ messages in thread
From: Nicolas Pitre @ 2009-08-22  5:52 UTC (permalink / raw)
  To: Junio C Hamano, Johannes Schindelin; +Cc: git


try out:

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

It then silently fails, except for the return code of 1.

With -v this is the same result.  Only if I remove --depth= do I get:

>From git://git.kernel.org/pub/scm/git/git
 = [up to date]      html       -> origin/html
 = [up to date]      maint      -> origin/maint
 = [up to date]      man        -> origin/man
 = [up to date]      master     -> origin/master
 = [up to date]      next       -> origin/next
 = [up to date]      pu         -> origin/pu
 = [up to date]      todo       -> origin/todo

and a return code of 0.

It seems that commit c6bc400585 is partly responsible for that 
misbehavior.  At least reverting it makes the status list appear again 
even with the presence of --depth=.

But still, actual result isn't any better.  Using --depth=2 or 
--depth=1000 doesn't change anything, unless there is _also_ a ref that 
was updated on the remote end.  Looks like the code is happy to conclude 
that there is nothing to do if local refs match remote refs and never go 
to talk further to the remote end ("no "shallow ..." nor "deepen ..." 
are sent over the wire) despite the fact that --depth=1000 would 
certainly have to trigger a pack transfer.

I'm also surprised that such thing as simple deepening of a repo is not 
in the test suite.  We certainly document this operation in the 
git-fetch man page though.

The code in builtin-fetch-pack.c still looks rather confusing to me, so 
hopefully you are more familiar with it and can provide a fix.


Nicolas

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2009-08-28 19:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22  5:52 git fetch --depth=* broken? Nicolas Pitre
2009-08-24  4:04 ` [PATCH] fix simple deepening of a repo Nicolas Pitre
2009-08-24  4:49   ` Junio C Hamano
2009-08-24 13:55     ` Nicolas Pitre
2009-08-24 14:20       ` Johan Herland
2009-08-24 22:21       ` Junio C Hamano
2009-08-24 16:26     ` Daniel Barkalow
2009-08-24 22:30       ` Julian Phillips
2009-08-25  0:18         ` Nicolas Pitre
2009-08-25  2:12           ` Shawn O. Pearce
2009-08-25  5:00             ` Sverre Rabbelier
2009-08-25  5:21             ` Junio C Hamano
2009-08-25  6:12               ` Shawn O. Pearce
2009-08-25  6:33                 ` Junio C Hamano
2009-08-25 15:14                   ` Shawn O. Pearce
2009-08-26  2:10                     ` Shawn O. Pearce
2009-08-26  7:08                       ` Johannes Sixt
2009-08-26  8:22                         ` Shawn O. Pearce
2009-08-26  9:03                           ` Junio C Hamano
2009-08-26 17:03                             ` Shawn O. Pearce
2009-08-28 17:30                       ` [RFC PATCH] upload-pack: expand capability advertises additional refs Shawn O. Pearce
2009-08-28 19:07                         ` Junio C Hamano

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).