git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* with git 1.8.3.1 get only merged tags
@ 2018-09-11 10:43 Michal Novotny
  2018-09-11 19:05 ` Jeff King
  2018-09-13 11:27 ` Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Novotny @ 2018-09-11 10:43 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: with git 1.8.3.1 get only merged tags
  2018-09-11 10:43 with git 1.8.3.1 get only merged tags Michal Novotny
@ 2018-09-11 19:05 ` Jeff King
  2018-09-13  8:36   ` Michal Novotny
  2018-09-13 11:27 ` Ævar Arnfjörð Bjarmason
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff King @ 2018-09-11 19:05 UTC (permalink / raw)
  To: Michal Novotny; +Cc: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: with git 1.8.3.1 get only merged tags
  2018-09-11 19:05 ` Jeff King
@ 2018-09-13  8:36   ` Michal Novotny
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Novotny @ 2018-09-13  8:36 UTC (permalink / raw)
  To: peff; +Cc: git

On Tue, Sep 11, 2018 at 9:05 PM Jeff King <peff@peff.net> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: with git 1.8.3.1 get only merged tags
  2018-09-11 10:43 with git 1.8.3.1 get only merged tags Michal Novotny
  2018-09-11 19:05 ` Jeff King
@ 2018-09-13 11:27 ` Ævar Arnfjörð Bjarmason
  2018-09-14 10:47   ` Michal Novotny
  1 sibling, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-09-13 11:27 UTC (permalink / raw)
  To: Michal Novotny; +Cc: git, Jeff King


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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: with git 1.8.3.1 get only merged tags
  2018-09-13 11:27 ` Ævar Arnfjörð Bjarmason
@ 2018-09-14 10:47   ` Michal Novotny
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Novotny @ 2018-09-14 10:47 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git, Jeff King

On Thu, Sep 13, 2018 at 1:27 PM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-14 10:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 10:43 with git 1.8.3.1 get only merged tags Michal Novotny
2018-09-11 19:05 ` Jeff King
2018-09-13  8:36   ` Michal Novotny
2018-09-13 11:27 ` Ævar Arnfjörð Bjarmason
2018-09-14 10:47   ` Michal Novotny

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).