Re: any way to apply tag across all branches in repository?
- From
- Chris 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