On Tue, Sep 11, 2018 at 12:43:15PM +0200, Michal Novotny wrote:
> I need to emulate git tag --merged with very old git 1.8.3.1. Is that
> somehow possible?
> I am looking for a bash function that would take what git 1.8.3.1
> offers and return only the tags accessible from the current branch
> tip. Could you, please, give me at least a hint how this could be
> done?
This is not particularly fast, but it should work:
git for-each-ref refs/tags |
cut -f2 |
while read tag; do
test "$(git merge-base $tag HEAD)" = \
"$(git rev-parse $tag^{commit})" && echo $tag
done
-Peff