From: Junio C Hamano <gitster@pobox.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: git@vger.kernel.org, "Luis R. Rodriguez" <mcgrof@suse.com>,
Jiri Slaby <jslaby@suse.cz>, Andreas Schwab <schwab@suse.de>,
Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] tag: add -i and --introduced modifier for --contains
Date: Wed, 16 Apr 2014 15:02:20 -0700 [thread overview]
Message-ID: <xmqqppkhexw3.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1397681938-18594-1-git-send-email-mcgrof@do-not-panic.com> (Luis R. Rodriguez's message of "Wed, 16 Apr 2014 13:58:58 -0700")
"Luis R. Rodriguez" <mcgrof@do-not-panic.com> writes:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> Upstream Linux kernel commit c5905afb was introduced on v3.4 but
> git describe --contains yields v3.5
Actually, "describe --contains" should yield v3.5-rc1~120^3~76^2,
not v3.5.
And you are right that the commit is contained in v3.4, so we also
should be able to describe it as v3.4~479^2~9^2 as well.
And between v3.4 and v3.5-rc1, the latter is a closer anchor point
for that commit (v3.5-rc1 only needs about 200 hops to reach the
commit, while from v3.4 you would need close to 500 hops), hence we
end up picking the latter as "a better answer".
Now, with the explanation of how/why this happens behind us, I see
two possible issues with this patch:
- The reason a human-user rejects v3.5-rc1~120^3~76^2 as the
solution and favor v3.4~479^2~9^2 could be because of the -rc1
part in the answer. Perhaps we would want an option that affects
which tags are to be used (and which tags are to be excluded) as
anchoring points?
- If we are truly interested in finding out the "earliest tag that
contains the given commit", shouldn't we be ignoring the tagname
and go with the tag with the oldest timestamp? After all, there
may be a fix merged to v7.0 first on April 1st, and then on a
later date the same fix may be merged to the maintenance track to
be tagged as v6.9.1 on May 5th, and in such a case, wouldn't you
want to say that the fix first appeared on v7.0 on April 1st,
instead of on May 5th?
Thanks.
next prev parent reply other threads:[~2014-04-16 22:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 20:58 [PATCH] tag: add -i and --introduced modifier for --contains Luis R. Rodriguez
2014-04-16 22:02 ` Junio C Hamano [this message]
2014-04-16 22:35 ` Luis R. Rodriguez
2014-04-17 17:04 ` Junio C Hamano
2014-04-17 22:16 ` Jeff King
2014-04-18 16:26 ` Junio C Hamano
2014-04-22 4:04 ` W. Trevor King
2014-04-18 23:17 ` Luis R. Rodriguez
2014-04-18 23:36 ` Junio C Hamano
2014-04-22 0:38 ` Luis R. Rodriguez
2014-04-22 10:27 ` Jan Kara
2014-04-22 17:58 ` Junio C Hamano
2014-04-17 7:17 ` Andreas Schwab
2014-04-17 17:05 ` Junio C Hamano
2014-04-17 17:30 ` Andreas Schwab
2014-04-17 18:49 ` Junio C Hamano
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=xmqqppkhexw3.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jack@suse.cz \
--cc=jslaby@suse.cz \
--cc=mcgrof@do-not-panic.com \
--cc=mcgrof@suse.com \
--cc=schwab@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).