Thread (16 messages) flat view 16 messages, 4 authors, 2016-06-15

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

From: Chris Friesen <hidden>
Date: 2016-06-15 22:46:48

Brandon Casey wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help