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

git-fetch and unannotated tags

From
APAndy Parkins <andyparkins@gmail.com>
Date
Apr 25, 2007, 19:04 UTC
Message-ID
<200704252004.45112.andyparkins@gmail.com>
Hello,

I often use unannotated tags to mark particular revisions in a repository. I use unannotated tags just as I would a bookmark. Annotated tags I reserve for information about a particular revision that I want to share with the world. In essence I treat unannotated tags as private and annotated tags as public.

Unfortunately, git doesn't help me with this. When I fetch from a repository that has unannotated tags, those tags are transferred.

Is there any way to stop this? I'm fine with git doing automatic transfer of annotated tags, but not the unannotated. The only way I can get around this is to use branches instead, that way whether they are transferred or not is completely under my control.

That makes me think that perhaps we should remove the special treatment of tags and treat them just like any other ref...

[remote "origin"]
  url = whatever
  fetch = refs/tags/*:refs/tags/*

However that still doesn't distinguish between annotated and unannotated. Maybe two different glob tokens?

[remote "origin"]
  url = whatever
  fetch = refs/tags/?:refs/tags/?
Would mean annotated tags only...
Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Next: Julian Phillips
Message 1 of 24 in “git-fetch and unannotated tags”
  1. Andy ParkinsApr 25, 2007
  2. Julian PhillipsApr 25, 2007
  3. Andy ParkinsApr 25, 2007
  4. Junio C HamanoApr 25, 2007
  5. Andy ParkinsApr 26, 2007
  6. Andreas EricssonApr 26, 2007
  7. Jakub NarebskiApr 27, 2007
  8. Junio C HamanoApr 29, 2007
  9. 0/2 bookmarks (was: Re: git-fetch and unannotated tags)Julian Phillips, Apr 25, 2007
  10. 1/2 refs.c: change do_one_ref to not discard any of baseJulian Phillips, Apr 25, 2007
  11. 2/2 Add basic support for bookmarks (create/edit/delete/list)Julian Phillips, Apr 25, 2007
  12. A Large Angry SCMApr 26, 2007
  13. Jeffrey C. OllieApr 26, 2007
  14. Junio C HamanoApr 26, 2007
  15. Julian PhillipsApr 26, 2007
  16. Junio C HamanoApr 26, 2007
  17. Julian PhillipsApr 26, 2007
  18. Andy ParkinsApr 26, 2007
  19. Andy ParkinsApr 26, 2007
  20. Petr BaudisApr 26, 2007
  21. Andy ParkinsApr 26, 2007
  22. Julian PhillipsApr 26, 2007
  23. Karl HasselströmApr 26, 2007
  24. Linus TorvaldsApr 26, 2007

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.