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

Re: [PATCH 0/4] Blame in reverse

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 3, 2008, 19:47 UTC
Message-ID
<7v1w5m201g.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<47F4BE98.8060209@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 11 quoted lines
> Junio C Hamano schrieb:
>> Usual "git blame" starts from the latest revision and finds where each
>> line came from (i.e. who came up with that brilliant idea, or more often
>> who introduced that bug).  This new mode starts from an old revision, and
>> annotates in reverse --- up to which point each line survived, before it
>> got replaced with something else. 
>
> Nice!! Is the result somehow different from
>
> 	$ git rev-list --reverse HEAD > /tmp/blame.revs
> 	$ git blame -S /tmp/blame.revs foo.c

Doesn't -S read from a graft-like file, where each line shows a commit and then its parents?

Come to think of it, I probably should have done:
	git rev-list --children

which is a mirror image of "git rev-list --parents". Unlike the additional "child" header in the output of the log-tree family, that would not have any controversial format or UI design issues. Also the resulting output from such command can then be fed via -S to blame.

However, as I mentioned in the message of [4/4], I think showing the commit that "introduced" the line is not useful when blame runs in reverse; blame needs to have a switch to tell it which commit to show (either "the guilty party" or "the ones the guilty party tried to pass blame on") anyway, so even though feeding an upside-down topology to the command via its "-S" can try to mimic what it does, it does not reallysolve what I wanted to do.

Previous: Johannes Sixt
Message 8 of 8 in “Blame in reverse”
  1. 0/4 Blame in reverseJunio C Hamano, Apr 3, 2008
  2. 1/4 "log" and friends: --children optionJunio C Hamano, Apr 3, 2008
  3. Johannes SchindelinApr 3, 2008
  4. 2/4 builtin-blame.c: move prepare_final() into a separate function.Junio C Hamano, Apr 3, 2008
  5. 3/4 builtin-blame.c: allow more than 16 parentsJunio C Hamano, Apr 3, 2008
  6. 4/4 git-blame --reverseJunio C Hamano, Apr 3, 2008
  7. Johannes SixtApr 3, 2008
  8. Junio C HamanoApr 3, 2008

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.