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

Re: using git-blame with patches as input

From
DZDon Zickus <dzickus@redhat.com>
Date
Jun 17, 2008, 14:17 UTC
Message-ID
<20080617141758.GL16941@redhat.com>
In-Reply-To
<7vabhl9hap.fsf@gitster.siamese.dyndns.org>
On Mon, Jun 16, 2008 at 02:54:54PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> 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".

I know, but I am trying to crawl before I run. So I am attacking the simple cases first to help me understand how the whole git internal mechanisms work (I am still trying to figure out the correct way to walk the revision list for a particular file using git-blame as a guide). Once my code works for the simple cases, then I can attack the more 'normal' cases like you described above.

Cheers, Don

Previous: Junio C Hamano
Message 6 of 6 in “using git-blame with patches as input”
  1. Don ZickusJun 16, 2008
  2. Junio C HamanoJun 16, 2008
  3. Don ZickusJun 17, 2008
  4. Junio C HamanoJun 16, 2008
  5. Junio C HamanoJun 16, 2008
  6. Don ZickusJun 17, 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.