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

Re: List tags for a certain branch

From: Jeff King <hidden>
Date: 2016-06-15 23:06:16

On Sun, Aug 23, 2015 at 08:06:39PM +0200, CoDEmanX wrote:
quoted
in a future version of git you should be able to do "git tag 
--merged" to get the tags that are "merged" to a particular branch. 

Would it return every tag in the branch, even if it was created in
that branch, and not merged from somewhere else? If no, than it's not
what I am looking for. 

(Or more precisely: would it give a list of all tags, that point to
commits present in the specified branch, regardless of whether these
commits were originally done in that branch or merged from another
branch? I hope my understanding of git is correct here...)
Yes, it would show all tags that are present in the history leading up
to that branch tip[1]. Git tracks a DAG of the history; it does not
remember "which branch" a particular action happened on.

-Peff

[1] Actually the argument to "--merged" does not need to be a branch at
    all. It is really a commit, so you could specify a tag, an extended
    sha-1 expression, etc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help