From: Junio C Hamano <gitster@pobox.com>
To: Kevin Daudt <me@ikke.info>
Cc: Istvan Pato <istvan.pato@gmail.com>, git@vger.kernel.org
Subject: Re: Bug in 'git describe' if I have two tags on the same commit.
Date: Mon, 13 Feb 2017 12:35:51 -0800 [thread overview]
Message-ID: <xmqqo9y5de1k.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170213154407.GA31568@alpha.ikke.info> (Kevin Daudt's message of "Mon, 13 Feb 2017 16:44:07 +0100")
Kevin Daudt <me@ikke.info> writes:
> On Sun, Feb 12, 2017 at 01:15:22PM +0100, Istvan Pato wrote:
>
>> (master) [1] % git show-ref --tag
>> 76c634390... refs/tags/1.0.0
>> b77c7cd17... refs/tags/1.1.0
>> b77c7cd17... refs/tags/1.2.0
>>
>> (master) % git describe --tags --always
>> 1.1.0-1-ge9e9ced
>>
>> ### Expected: 1.2.0
>> ...
>
> Are these lightweight tags? Only annotated tags have a date associated
> to them, which is where the rel-notes refers to.
Good eyes. The fact that the two points at the same object means
that even if they were both annotated tags, they have the same
tagger dates.
If the code that compares the candidates and picks better tag to
describe the object with knows the refnames of these "tags", I'd
imagine that we could use the versioncmp() logic as the final tie
breaker, but I do not offhand remember if the original refname we
took the tag (or commit) from is propagated that deep down the
callchain. It probably does not, so some code refactoring may be
needed if somebody wants to go in that direction.
next prev parent reply other threads:[~2017-02-13 20:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-12 12:15 Bug in 'git describe' if I have two tags on the same commit Istvan Pato
2017-02-13 15:44 ` Kevin Daudt
2017-02-13 20:35 ` Junio C Hamano [this message]
2017-02-14 8:07 ` Istvan Pato
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo9y5de1k.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=istvan.pato@gmail.com \
--cc=me@ikke.info \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox