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

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

From
Shawn Pearce <spearce@spearce.org>
Date
Jan 5, 2012, 03:05 UTC
Message-ID
<CAJo=hJvL2ebziPw=0q-e=G3WFEvEKtFR2xMFMiquSyrHJDradA@mail.gmail.com>
In-Reply-To
<7vwr97nho7.fsf@alter.siamese.dyndns.org>
2012/1/4 Junio C Hamano <gitster@pobox.com>:
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>>  We should also fetch tags that reference to downloaded objects.
>
> I do not think this has much merit.

I disagree. Its useful because cloning a branch immediately after it has been tagged for a release should have `git describe` provide back the name of the release from the tag (assuming of course no new commits were made since the tag).

Show 6 quoted lines
> 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?

We aren't talking about fetching the ancient history tags. We are talking about fetching a tag that *directly* points at one of the commits we did download the complete tree of.

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

I think I agree with you on priority of work effort. But I lack time to make good on that by writing the code myself. :-)

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 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.