Re: with git 1.8.3.1 get only merged tags
On Thu, Sep 13, 2018 at 1:27 PM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Sep 11 2018, 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 > > Jeff answer the question you had, but I just have one of my own: Is > RedHat stuck on 1.8-era git in some release it's still maintaining, does > this mean that e.g. you're still backporting security fixes to this > 2012-era release? Yes, that's exactly the case with RHEL-7. clime
Re: with git 1.8.3.1 get only merged tags
On Tue, Sep 11 2018, 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 Jeff answer the question you had, but I just have one of my own: Is RedHat stuck on 1.8-era git in some release it's still maintaining, does this mean that e.g. you're still backporting security fixes to this 2012-era release?
Re: with git 1.8.3.1 get only merged tags
On Tue, Sep 11, 2018 at 9:05 PM Jeff King wrote: > > 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 That works for me. Thank you a lot for help! clime > > -Peff
Re: with git 1.8.3.1 get only merged tags
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
with git 1.8.3.1 get only merged tags
Hello, 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? Thank you clime