git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Shallow clones (git clone --depth) are broken?
@ 2009-02-19 19:55 Jim Ramsay
  2009-02-20  2:49 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Ramsay @ 2009-02-19 19:55 UTC (permalink / raw)
  To: git

I've been trying to experiment with shallow clones, however I can't
seem to actually create one.  Here's what I've tried, for example:

git clone --depth 1 git://git.fluxbox.org/fluxbox.git

However, this gets me everything, and takes quite a while.  After it
completes, running gitk shows me the entire history, and the size of
the .git directory is the same as a full clone I've done previously.

I've tried this with both 1.6.0.2 and 1.6.1.3, to the same effect.

Can anyone out there verify that this --depth option actually does
anything?  Or could it potentially be the version of git on the
server?

If it's not just something odd I'm doing, I can take the time to
try to figure out in which version this *does* work, and when it
stopped... Though others out there may be more equipped than I to chase
this down.

-- 
Jim Ramsay

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

* Re: Shallow clones (git clone --depth) are broken?
  2009-02-19 19:55 Shallow clones (git clone --depth) are broken? Jim Ramsay
@ 2009-02-20  2:49 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2009-02-20  2:49 UTC (permalink / raw)
  To: Jim Ramsay; +Cc: git

On Thu, Feb 19, 2009 at 02:55:24PM -0500, Jim Ramsay wrote:

> I've been trying to experiment with shallow clones, however I can't
> seem to actually create one.  Here's what I've tried, for example:
> 
> git clone --depth 1 git://git.fluxbox.org/fluxbox.git
> 
> However, this gets me everything, and takes quite a while.  After it
> completes, running gitk shows me the entire history, and the size of
> the .git directory is the same as a full clone I've done previously.
> 
> I've tried this with both 1.6.0.2 and 1.6.1.3, to the same effect.
> 
> Can anyone out there verify that this --depth option actually does
> anything?  Or could it potentially be the version of git on the
> server?

Sorry, I can't reproduce (using 1.6.0.2):

  $ git clone git://git.fluxbox.org/fluxbox.git full
  Initialized empty Git repository in /home/peff/full/.git/
  remote: Counting objects: 31521, done.
  remote: Compressing objects: 100% (8013/8013), done.
  remote: Total 31521 (delta 24321), reused 30542 (delta 23462)
  Receiving objects: 100% (31521/31521), 8.08 MiB | 499 KiB/s, done.
  Resolving deltas: 100% (24321/24321), done.
  $ du -sh full/.git
  9.2M    full/.git

  $ git clone --depth 1 git://git.fluxbox.org/fluxbox.git shallow
  Initialized empty Git repository in /home/peff/shallow/.git/
  remote: Counting objects: 5402, done.
  remote: Compressing objects: 100% (3310/3310), done.
  remote: Total 5402 (delta 4148), reused 2969 (delta 2057)
  Receiving objects: 100% (5402/5402), 3.07 MiB | 408 KiB/s, done.
  Resolving deltas: 100% (4148/4148), done.
  $ du -sh shallow/.git
  3.5M    shallow/.git

There is some server support required for shallow clone; I didn't check,
but I assume that the client would degrade gracefully to a full clone.
In which case, is it possible that fluxbox.org upgraded since you
tested? Can you try again?

-Peff

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

end of thread, other threads:[~2009-02-20  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 19:55 Shallow clones (git clone --depth) are broken? Jim Ramsay
2009-02-20  2:49 ` Jeff King

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