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

Re: How to create tags outside of refs/tags?

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 22, 2011, 15:06 UTC
Message-ID
<AANLkTim93jDnbTPYVk2zjxf+usPT==gMxK4ezUc9AcHx@mail.gmail.com>
In-Reply-To
<AANLkTi=7yUh9J9S5LdpNY0SwCv008ih2LEd3KNvy46sL@mail.gmail.com>

On Tue, Feb 22, 2011 at 1:17 AM, Christian Halstrick <christian.halstrick@gmail.com> wrote:

Show 7 quoted lines
> Is there any better way to achieve that certain commits are not
> garbage collected than to create such tags. I love my foot and don't
> want to "shoot if off" but I want to make sure the the
> "release-process-machinery" in our company can be sure that certain
> source states are never gc'ed. I can also live with creating normal
> tags 'refs/tags/release/1.20' but would prefer a solution where 'git
> tags' shows only developer created tags.
Yes, I'm sorry I wasn't more careful/clearer in my earlier reply.
> Will any ref underneath "refs/' prevent gc to garbage collect a
> commit? Or only those in the well-known locations (e.g. refs/tags/*)

Anything under refs/ is safe, but you should create a subdirectory so that you've got your own name-space under there. For example, the gerrit code review system uses refs/changes/ for its refs.

Because these refs would be outside git's normal name-spaces (refs/heads and refs/tags), they won't be fetched by the default (non-mirror) refspec.

j.
Previous: Enrico Weigelt
Message 16 of 16 in “How to create tags outside of refs/tags?”
  1. Christian HalstrickFeb 21, 2011
  2. Jay SoffianFeb 21, 2011
  3. Junio C HamanoFeb 21, 2011
  4. Christian HalstrickFeb 22, 2011
  5. Jeff KingFeb 22, 2011
  6. Junio C HamanoFeb 22, 2011
  7. Jeff KingFeb 22, 2011
  8. Jakub NarebskiFeb 22, 2011
  9. Jeff KingFeb 22, 2011
  10. Christian HalstrickFeb 22, 2011
  11. Junio C HamanoFeb 22, 2011
  12. Christian HalstrickFeb 22, 2011
  13. Michael J GruberFeb 23, 2011
  14. Christian HalstrickFeb 23, 2011
  15. Enrico WeigeltFeb 23, 2011
  16. Jay SoffianFeb 22, 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.