git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Don Zickus <dzickus@redhat.com>
Cc: git@vger.kernel.org
Subject: Re: using git-blame with patches as input
Date: Mon, 16 Jun 2008 14:54:54 -0700	[thread overview]
Message-ID: <7vabhl9hap.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080616213517.GE20727@redhat.com> (Don Zickus's message of "Mon, 16 Jun 2008 17:35:17 -0400")

Don Zickus <dzickus@redhat.com> writes:

> For example, if I took the top three commits from HEAD and appended them
> into one patch file and then ran this tool with the patch as input, I
> would hope that it gave as output the three original commits.

Unfortunately blame does not work in such an inefficient way.  The patch
text from your second commit (that is, the diff that shows what used to be
in the first commit and what is in the second commit) may be further
rewritten in the third commit, so if you start blaming such a text from
HEAD, the blame stops at the HEAD commit saying "the text you have is even
newer".

> ...  Unfortunately, I don't quite understand
> some of the algorithms git-blame does when it splits the patch chunks into
> smaller pieces to determine which pieces are blame-able on the parents.

http://thread.gmane.org/gmane.comp.version-control.git/28826

  parent reply	other threads:[~2008-06-16 21:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 21:35 using git-blame with patches as input Don Zickus
2008-06-16 21:45 ` Junio C Hamano
2008-06-17 14:15   ` Don Zickus
2008-06-16 21:54 ` Junio C Hamano [this message]
2008-06-16 22:08   ` Junio C Hamano
2008-06-17 14:17   ` Don Zickus

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vabhl9hap.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=dzickus@redhat.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).