All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: git@vger.kernel.org, Jiri Slaby <jslaby@suse.cz>,
	Andreas Schwab <schwab@suse.de>, Jan Kara <jack@suse.cz>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH] tag: add -i and --introduced modifier for --contains
Date: Fri, 18 Apr 2014 16:36:20 -0700	[thread overview]
Message-ID: <xmqq7g6mb47f.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAB=NE6Vt8etieyR256Hxb=q6zMo7UAO2Zkm5900NrE+4=-3eXA@mail.gmail.com> (Luis R. Rodriguez's message of "Fri, 18 Apr 2014 16:17:38 -0700")

"Luis R. Rodriguez" <mcgrof@do-not-panic.com> writes:

> I think ultimately this reveals that given that tags *can* be
> arbitrary and subjective,...

Yes; see the part at the bottom.

>> Commit A can be described in terms of both v3.4 and v9.0,
>
> And in the real example case, why *would* c5905afb' be be described in
> terms of v3.5 instead of v3.4 ?

I am not interested in graphing that particular history between v3.4
and v3.5 myself.  If you are interested, I already gave you enough
information on how to figure that out.

>>     - find candidate tags that can be used to "describe --contains"
>>       the commit A, yielding v3.4, v3.5 (not shown), and v9.0;
>
>>     - among the candidate tags, cull the ones that contain another
>>       candidate tag, rejecting v3.5 (not shown) and v9.0;
>
>>     - among the surviving tags, pick the closest.
>>
>> Hmm?
>
> Sounds good to me!

Not so fast ;-)

My other message to Peff in response to his another example has an
updated position on this.  "Reject candidates that can reach other
candidates" is universally correct, but after that point, there are
at least three but probably more options that suit preference of
different people and project to break ties:

 - Your case that started this thread may want to favor v3.4 if only
   because that v3.4 _sounds_ smaller than v4.0 (in Peff's example),
   even when v3.4 and v4.0 do not have ancestry relationship.

 - The "closest" we have had is a heuristic to produce a result that
   is textually shorter.

 - And as I alluded to, "which one has the earliest timestamp?", is
   another valid question to ask.

And there may be more to appear.  A new command line option (and
possibly a new configuration) to choose from these three (and more
heuristics that will be added later) would be necessary.

  reply	other threads:[~2014-04-18 23:36 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
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 [this message]
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=xmqq7g6mb47f.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=peff@peff.net \
    --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.