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

Re: blame -C: adding a line in moved content sometimes affect blame result

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 9, 2011, 03:25 UTC
Message-ID
<7v4o3zznx6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4DEF041A.9070003@gmail.com>
Andrew Wong <andrew.kw.w@gmail.com> writes:
Show 6 quoted lines
>
> After moving content from file1 to file2, "git blame -C file2"
> correctly shows that the content came from file1. However, if I add a
> line in near the top or bottom of the moved content in file2, "git
> blame -C file2" fails to detect that the top or bottom of the moved
> contents came from file1.

Probably your first few remaining lines of file2 are considered insignificant copy by the logic in step 4 described in:

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

I didn't actually tried to follow what the code does to your exact input, though.

Previous: Andrew Wong
Message 3 of 3 in “blame -C: adding a line in moved content sometimes affect blame result”
  1. Andrew WongJun 8, 2011
  2. Andrew WongJun 9, 2011
  3. Junio C HamanoJun 9, 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.