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

Re: [PATCH] Do not fetch tags on new shallow clones

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2012, 23:59 UTC
Message-ID
<7vwr97nho7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1325676922-6995-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>  This could also be applied for normal clones. But I don't think
>  there are many use cases for it, enough to deserve new --no-tags
>  option.
Correct.
>  We should also fetch a single branch, but because branches are
>  usually less crowded and stay close the tip, they do not produce too
>  many extra objects. Let's leave it until somebody yells up.
Probably this is needed.
>  We should also fetch tags that reference to downloaded objects.

I do not think this has much merit. The usual tag-following rules AFAIK assumes that if you have the commit C then you ought to have all the ancestors of C, which does not apply at all for the shallow hack to begin with, and if you make the rule apply for the shallow hack, you would end up slurping the objects that are needed only for ancient versions, which would defeat the objective of this patch, no?

It also is my understanding that the shallow hack is almost always used with a depth of one, not a range, like "git archive | tar xf -", so if anything, I would say a single-branch cloning has much higher priority than following tags.

Will queue on 'pu'. Thanks.
Previous: Shawn PearceNext: Shawn Pearce
Message 3 of 12 in “Do not fetch tags on new shallow clones”
  1. Do not fetch tags on new shallow clonesNguyễn Thái Ngọc Duy, Jan 4, 2012
  2. Shawn PearceJan 4, 2012
  3. Junio C HamanoJan 4, 2012
  4. Shawn PearceJan 5, 2012
  5. Junio C HamanoJan 5, 2012
  6. Shawn PearceJan 5, 2012
  7. Limit refs to fetch to minimum in shallow clonesNguyễn Thái Ngọc Duy, Jan 5, 2012
  8. Junio C HamanoJan 5, 2012
  9. Limit refs to fetch to minimum in shallow clonesNguyễn Thái Ngọc Duy, Jan 6, 2012
  10. Junio C HamanoJan 6, 2012
  11. Nguyen Thai Ngoc DuyJan 7, 2012
  12. clone: add --single-branch to fetch only one branchNguyễn Thái Ngọc Duy, Jan 7, 2012

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.