git log --decorate
adds information about related refs to the log output:
commit 9e895ace5d82df8929b16f58e9f515f6d54ab82d (tag: v3.10-rc7)
Author: L
As you can see, older tag names are used as reference point rather than the point where the commit got merged.
That should be possible... soon (git 1.8.4 July 2013):
See commit e00dd1e9485c50f202cc97dfae19d510e108b565:
describe: Add --first-parent option
Only consider the first parent commit when walking the commit history.
This is useful if you only wish to match tags on your branch after a merge.
The OP Lekensteyn comments it (--first-parent
) isn't enough:
--first-parent
does not show the tag where it got merged too.
I just discovered that--contains
can be used for that.
See my answer for an even better solution, git name-rev.
Note: git name-rev
dates back from git0.99.9 (Oct. 2005!).