All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Bernhard R. Link" <brl+git@mail.brlink.eu>
Cc: git@vger.kernel.org
Subject: Re: [RFC v2] blame: new option --prefer-first to better handle merged cherry-picks
Date: Mon, 13 Jan 2014 15:01:41 -0800	[thread overview]
Message-ID: <xmqqbnzf5vvu.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140113225229.GA3418@client.brlink.eu> (Bernhard R. Link's message of "Mon, 13 Jan 2014 23:52:29 +0100")

"Bernhard R. Link" <brl+git@mail.brlink.eu> writes:

> * Junio C Hamano <gitster@pobox.com> [140113 23:31]:
>> I read the updated documentation three times but it still does not
>> answer any of my questions I had in $gmane/239888, the most
>> important part of which was:
>>
>>     Yeah, the cherry-picked one will introduce the same change as
>>     the one that was cherry-picked, so if you look at the end result
>>     and ask "where did _this_ line come from?", there are two
>>     equally plausible candidates, as "blame" output can give only
>>     one answer to each line.  I still do not see why the one that is
>>     picked with the new option is better.
>
> Because:
>   - it will blame the modifications of merged cherry-picked commit
>     to only one commit. Without the option parts of the modification
>     will be reported as coming from the one, parts will be reported
>     to be from the other. With the option only one of those two commits
>     is reported as the origin at the same time and not both.
>   - it is more predictable which commit is blamed, so if one is
>     interested in where some commit was introduced first into a
>     "mainline", one gets this information, and not somtimes a different
>     one due to unrelated reasons.
>
>> To put it another way, why/when would an end user choose to use this
>> option?  If the result of using this option is always better than
>> without, why/when would an end user choose not to use this option?
>
> While the result is more consistent and more predictable in the case
> of merged cherry picks, it is also slower in every case.

Consistent and predictable, perhaps, but I am not sure "exact" would
be a good word.

Wouldn't the result depend on which way the cherry pick went, and
then the later merge went?  In the particular topology you depicted
in the log message, the end result may happen to point at the same
commit for these two paths, but I am not sure how the change
guarantees that "we always point at the same original commit not the
cherry-picked one", which was implied by the log message, if your
cherry-pick and merge went in different direction in similar
topologies.

And that is why I said:

    At best, it looks to me that it is saying "running with this
    option may (or may not) give a different answer, so run the
    command with and without it and see which one you like"

With the stress on "different" answer; it the change were "with the
option the result is always better, albeit you will have to wait
longer", I would not have this much trouble accepting the change,
though.

  reply	other threads:[~2014-01-13 23:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13  6:30 [RFC v2] blame: new option --prefer-first to better handle merged cherry-picks Bernhard R. Link
2014-01-13 22:26 ` Junio C Hamano
2014-01-13 22:52   ` Bernhard R. Link
2014-01-13 23:01     ` Junio C Hamano [this message]
2014-01-14  1:00       ` Junio C Hamano
2014-01-14  8:37         ` Junio C Hamano
2014-01-14 19:12           ` 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=xmqqbnzf5vvu.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=brl+git@mail.brlink.eu \
    --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.
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.