All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Shawn Pearce <spearce@spearce.org>
Cc: git <git@vger.kernel.org>
Subject: Re: blame --reverse selecting wrong commit
Date: Mon, 30 May 2011 13:01:25 -0700	[thread overview]
Message-ID: <7vei3glzze.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <BANLkTikvmQgW=x0GYY6Yu=BnOgG+RXOCug@mail.gmail.com> (Shawn Pearce's message of "Mon, 30 May 2011 10:57:54 -0700")

Shawn Pearce <spearce@spearce.org> writes:

>> Yeah.
>>
>> It has always been my opinion that asking for "one commit past the blamed
>> one" is a undefined request (after all, blame for the line fell on that
>> commit exactly why the next commit does _not_ have any corresponding
>> line), so that is why I punted there.
>
> I don't think its undefined. Normally with blame/annotate we want to
> discover who put this line here, that is who did the insertion or
> replacement that made this line show up in the result file.

Very true. The question that does not have a defined answer is "what
content was before this commit on that blamed line", and that is very
different from "what commit was there before this commit the line is
blamed for". The topic of this thread is the latter, and I was referring
the former which is offtopic because I was confused and tired.

> The catch is, its slightly more expensive than forward because we pass
> blame down *all* paths of a fork, rather than only the one that was
> identical.

Hmm, I don't know. Isn't it just the matter of running the current
"reverse blame" to find the newest revision that had the line (without any
"dig wider"), and then dig a single level wider by comparing that revision
and all its children to see which child has the line in question removed?

      reply	other threads:[~2011-05-30 20:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30  2:21 blame --reverse selecting wrong commit Shawn Pearce
2011-05-30  2:33 ` Shawn Pearce
2011-05-30  3:11   ` Shawn Pearce
2011-05-30  6:47     ` Junio C Hamano
2011-05-30 17:57       ` Shawn Pearce
2011-05-30 20:01         ` Junio C Hamano [this message]

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=7vei3glzze.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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.