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:05 UTC
Message-ID
<4A130309.2060407@nortel.com>
In-Reply-To
<NFLo0xGp2o-oBdtr_pq1jvwATe1ZALaD9dHkr5hmKNkU30gr_isMpQ@cipher.nrlssc.navy.mil>
Brandon Casey wrote:
Show 7 quoted lines
> Try these commands:
> 
>   git describe $main
>   git describe $arch_branch
>   git tag -m 'a test tag' my_tag $main
>   git describe $main
>   git describe $arch_branch

In the commands below, "main" is $main, and "arch" is $arch_branch. I'm starting out with the arch branch checked out.

[cfriesen@localhost linux]$ git describe main dynamic_ftrace_excluded-auto-mark-225-g7c2dc32 [cfriesen@localhost linux]$ git describe arch dynamic_ftrace_excluded-auto-mark-225-g7c2dc32 [cfriesen@localhost linux]$ git tag -m 'a test tag' my_tag ncgl [cfriesen@localhost linux]$ git describe arch my_tag [cfriesen@localhost linux]$ git describe arch my_tag

So far so good. Now I make a change to the arch branch, and add another tag to the main branch.

[cfriesen@localhost linux]$ echo a > asdf
[cfriesen@localhost linux]$ git add asdf
[cfriesen@localhost linux]$ git commit
Created commit 4c8dfa7: blah
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 asdf

[cfriesen@localhost linux]$ git describe main my_tag [cfriesen@localhost linux]$ git describe arch my_tag-1-g4c8dfa7

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.

Chris
Previous: Brandon CaseyNext: Brandon Casey
Message 13 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.