Junio C Hamano <gitster@xxxxxxxxx> writes: > Orgad Shaneh <orgads@xxxxxxxxx> writes: > >> What I'd like to have is a way to tell the first tag per branch (or >> per merge) that the commit appeared on. > >> I think that this can be done by filtering out tags that are connected >> to already listed tags by first-parent link. > > Yes. When one tag can be reached by another tag, then the former is > definitely an earlier tag than the latter. > > A trivial way to compute it would require O(n^2) invocations of "git > merge-base --is-ancestor". Alternatively, I think you can perhaps > use "git merge-base --independent". Ah, forget the latter. "independent" is about solving the opposite use case--it is to cull the ones that can be reached by other tips.