git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: blame --reverse selecting wrong commit

From
Junio C Hamano <gitster@pobox.com>
Date
May 30, 2011, 20:01 UTC
Message-ID
<7vei3glzze.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTikvmQgW=x0GYY6Yu=BnOgG+RXOCug@mail.gmail.com>
Shawn Pearce <spearce@spearce.org> writes:
Show 10 quoted lines
>> 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?

Previous: Shawn Pearce
Message 6 of 6 in “blame --reverse selecting wrong commit”
  1. Shawn PearceMay 30, 2011
  2. Shawn PearceMay 30, 2011
  3. Shawn PearceMay 30, 2011
  4. Junio C HamanoMay 30, 2011
  5. Shawn PearceMay 30, 2011
  6. Junio C HamanoMay 30, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.