From: Jeff King <peff@peff.net>
To: Michal Novotny <clime@redhat.com>
Cc: git@vger.kernel.org
Subject: Re: with git 1.8.3.1 get only merged tags
Date: Tue, 11 Sep 2018 15:05:19 -0400 [thread overview]
Message-ID: <20180911190519.GA8396@sigill.intra.peff.net> (raw)
In-Reply-To: <CANT8FXRbep_32-eeMSa0C1e6q6MUvFddgTUiUgqv54J-2c+iXg@mail.gmail.com>
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
next prev parent reply other threads:[~2018-09-11 19:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 10:43 with git 1.8.3.1 get only merged tags Michal Novotny
2018-09-11 19:05 ` Jeff King [this message]
2018-09-13 8:36 ` Michal Novotny
2018-09-13 11:27 ` Ævar Arnfjörð Bjarmason
2018-09-14 10:47 ` Michal Novotny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180911190519.GA8396@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=clime@redhat.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).