All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: Junio C Hamano <gitster@pobox.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:35:07 -0700	[thread overview]
Message-ID: <CAB=NE6VvDrMQ4ybF10MpXM-2672OdUTC_Rp2mdO3a5fuo1-H1Q@mail.gmail.com> (raw)
In-Reply-To: <xmqqppkhexw3.fsf@gitster.dls.corp.google.com>

On Wed, Apr 16, 2014 at 3:02 PM, Junio C Hamano <gitster@pobox.com> wrote:
> "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.

Yes, indeed thanks, sorry I should have been explicit.

> 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.

That'd be swell :)

> 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),

Ah! Thanks for explaining this mysterious puzzle to me. I'm a bit
perplexed why still. Can I trouble you for a little elaboration here?
How could one view from a commit merged on v3.4 possibly yield more
commits to v3.4 than to v3.5 ? Is it because it starts counting on the
merge's parent (v3.3) ?

> 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?

I'd take an rc release as a blessed point too so not sure, and come to
think of it I'm not a bit perplexed why the results for my change did
not yield an rc1 as well.

>  - 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,

At least for Linux linux-3.X.y branches (one example linux-3.4.y) on
linux-stable has different commit IDs from patches cherry picked from
Linus' tree, and that patch just referneces the upstream commit from
Linus' tree on the commit log, but nothing more.

> 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?

Sure, but I'd expect the folks maintaining v6.9.x would just refer to
the upstream commit ID from v7.0.

  Luis

  reply	other threads:[~2014-04-16 22:35 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
2014-04-16 22:35   ` Luis R. Rodriguez [this message]
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='CAB=NE6VvDrMQ4ybF10MpXM-2672OdUTC_Rp2mdO3a5fuo1-H1Q@mail.gmail.com' \
    --to=mcgrof@do-not-panic.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jack@suse.cz \
    --cc=jslaby@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.