git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Shallow clones (git clone --depth) are broken?

From
Jim Ramsay <i.am@jimramsay.com>
Date
Feb 19, 2009, 19:55 UTC
Message-ID
<20090219145524.32ca3915@vrm378-02.vrm378.am.mot.com>

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
Next: Jeff King
Message 1 of 2 in “Shallow clones (git clone --depth) are broken?”
  1. Jim RamsayFeb 19, 2009
  2. Jeff KingFeb 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.