Re: Shallow clones (git clone --depth) are broken?
On Thu, Feb 19, 2009 at 02:55:24PM -0500, Jim Ramsay wrote:
Show 14 quoted lines
> 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