git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/4] Blame in reverse
Date: Thu, 03 Apr 2008 12:47:23 -0700	[thread overview]
Message-ID: <7v1w5m201g.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <47F4BE98.8060209@viscovery.net> (Johannes Sixt's message of "Thu, 03 Apr 2008 13:25:12 +0200")

Johannes Sixt <j.sixt@viscovery.net> writes:

> 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.

      reply	other threads:[~2008-04-03 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03  9:08 [PATCH 0/4] Blame in reverse Junio C Hamano
2008-04-03  9:12 ` [PATCH 1/4] "log" and friends: --children option Junio C Hamano
2008-04-03 19:58   ` Johannes Schindelin
2008-04-03  9:13 ` [PATCH 2/4] builtin-blame.c: move prepare_final() into a separate function Junio C Hamano
2008-04-03  9:14 ` [PATCH 3/4] builtin-blame.c: allow more than 16 parents Junio C Hamano
2008-04-03  9:19 ` [PATCH 4/4] git-blame --reverse Junio C Hamano
2008-04-03 11:25 ` [PATCH 0/4] Blame in reverse Johannes Sixt
2008-04-03 19:47   ` 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=7v1w5m201g.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).