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

Re: any way to apply tag across all branches in repository?

From
CFChris Friesen <cfriesen@nortel.com>
Date
May 19, 2009, 19:49 UTC
Message-ID
<4A130D45.1050207@nortel.com>
In-Reply-To
<0WGSJO_TdUxCKWhDCupb3MaPOyPeVNH7Rs_7iKVnQcahmxUpwu8qzw@cipher.nrlssc.navy.mil>
Brandon Casey wrote:
> Chris Friesen wrote:
>> [cfriesen@localhost linux]$ git tag -m 'a test tag' my_tag ncgl
> 
> What's "ncgl"?  Another branch at the same tip as "arch"?
Oops, missed a replace.  "ncgl" is my main branch.
Show 19 quoted lines
> Ok, you tagged main, and previously arch was at the same state,
> so 'git describe' printed out 'my_tag' for both of them.  Now,
> the arch branch is ahead of main by one commit, so you get an
> expanded string from 'git describe' (the meaning of which I
> described earlier, above).
> 
>> Now we add another tag to the main branch:
>>
>> [cfriesen@localhost linux]$ git tag -m 'a test tag' my_tag2 main
>> [cfriesen@localhost linux]$ git describe main
>> my_tag
>> [cfriesen@localhost linux]$ git describe arch
>> my_tag-1-g4c8dfa7
>>
>> I assume that since there were no code changes on the main branch,
>> it doesn't think that there is any difference between the two tags.
> 
> Right.  There is no difference.  You created another tag pointing at
> the same revision as the first tag.  Here's something else to try:
<snip>
> Starting to make sense?

Yep. I still need whatever identifier I use to be associated with the head of each branch.

Based on the discussion (thanks for the explanations, by the way) I don't see any option other than looping through each branch and using tags with the branch name embedded in them to ensure uniqueness across the repository.

Chris
Previous: Brandon CaseyNext: Brandon Casey
Message 15 of 16 in “any way to apply tag across all branches in repository?”
  1. Chris FriesenMay 19, 2009
  2. Tomas CarneckyMay 19, 2009
  3. Chris FriesenMay 19, 2009
  4. Brandon CaseyMay 19, 2009
  5. Chris FriesenMay 19, 2009
  6. Linus TorvaldsMay 19, 2009
  7. Chris FriesenMay 19, 2009
  8. Linus TorvaldsMay 19, 2009
  9. Chris FriesenMay 19, 2009
  10. Linus TorvaldsMay 19, 2009
  11. Chris FriesenMay 19, 2009
  12. Brandon CaseyMay 19, 2009
  13. Chris FriesenMay 19, 2009
  14. Brandon CaseyMay 19, 2009
  15. Chris FriesenMay 19, 2009
  16. Brandon CaseyMay 19, 2009

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.