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

shallow clone not very shallow due to tags

From
Shawn Pearce <spearce@spearce.org>
Date
Aug 14, 2011, 23:58 UTC
Message-ID
<CAJo=hJuyZMj+qwFr_=stbQtGh2SCCpjfsBxm+2wbfJK=i_VTdw@mail.gmail.com>

$ git clone --depth 1 git://repo.or.cz/alt-git.git tmp_cgit_5 Cloning into tmp_cgit_5... remote: Counting objects: 20234, done. remote: Compressing objects: 100% (9454/9454), done. remote: Total 20234 (delta 16355), reused 13587 (delta 10421) Receiving objects: 100% (20234/20234), 9.15 MiB | 1.17 MiB/s, done. Resolving deltas: 100% (16355/16355), done.

$ cd tmp_cgit_5 $ git tag -l | grep 0.99 v0.99

Uhm. That is not a very shallow clone. The clone copied 20234 objects at 9.15 MiB... so its ~20 MiB lighter than a full clone. But nearly all of the tags exist, because the clone client is declaring want lines for them, making the server generate up to 1 commit back from the wanted tag. I know shallow support is the feature nobody wants to think about, but this just seems broken to me. Clients performing a shallow clone shouldn't be asking for tags... but they should be using the include-tag protocol option so that if they do happen to receive a tagged commit, the tag object will also be sent.

-- 
Shawn.
Next: Nguyen Thai Ngoc Duy
Message 1 of 7 in “shallow clone not very shallow due to tags”
  1. Shawn PearceAug 14, 2011
  2. Nguyen Thai Ngoc DuyAug 15, 2011
  3. Shawn PearceAug 15, 2011
  4. Philip OakleyAug 15, 2011
  5. Nguyen Thai Ngoc DuyAug 17, 2011
  6. Shawn PearceAug 17, 2011
  7. Nguyen Thai Ngoc DuyAug 17, 2011

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.