{"thread":{"id":"27573","subject":"blame -C: adding a line in moved content sometimes affect blame result","startedAt":"2011-06-08T05:09:46Z","lastAt":"2011-06-09T03:25:25Z","messageCount":3,"participants":["Andrew Wong","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"169533","messageId":"4DEF041A.9070003@gmail.com","threadId":"27573","inReplyTo":null,"subject":"blame -C: adding a line in moved content sometimes affect blame result","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2011-06-08T05:09:46Z","receivedAt":"2011-06-08T05:09:46Z","isPatch":false,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"I've attached a script for illustration.\n\nAfter moving content from file1 to file2, \"git blame -C file2\" correctly \nshows that the content came from file1. However, if I add a line in near \nthe top or bottom of the moved content in file2, \"git blame -C file2\" \nfails to detect that the top or bottom of the moved contents came from \nfile1. I looked around in blame.c, and this feels like a boundary case \nsomewhere inside find_copy_in_blob? Any clues?\n"},{"id":"169721","messageId":"4DF02280.8080004@gmail.com","threadId":"27573","inReplyTo":"4DEF041A.9070003@gmail.com","subject":"Re: blame -C: adding a line in moved content sometimes affect blame result","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2011-06-09T01:31:44Z","receivedAt":"2011-06-09T01:31:44Z","isPatch":false,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"On 11-06-08 1:09 AM, Andrew Wong wrote:\n> I've attached a script for illustration.\n>\n> After moving content from file1 to file2, \"git blame -C file2\" \n> correctly shows that the content came from file1. However, if I add a \n> line in near the top or bottom of the moved content in file2, \"git \n> blame -C file2\" fails to detect that the top or bottom of the moved \n> contents came from file1. I looked around in blame.c, and this feels \n> like a boundary case somewhere inside find_copy_in_blob? Any clues?\nAnyone has any ideas regarding this issue?\n"},{"id":"169724","messageId":"7v4o3zznx6.fsf@alter.siamese.dyndns.org","threadId":"27573","inReplyTo":"4DEF041A.9070003@gmail.com","subject":"Re: blame -C: adding a line in moved content sometimes affect blame result","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-06-09T03:25:25Z","receivedAt":"2011-06-09T03:25:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Wong <andrew.kw.w@gmail.com> writes:\n>\n> After moving content from file1 to file2, \"git blame -C file2\"\n> correctly shows that the content came from file1. However, if I add a\n> line in near the top or bottom of the moved content in file2, \"git\n> blame -C file2\" fails to detect that the top or bottom of the moved\n> contents came from file1.\n\nProbably your first few remaining lines of file2 are considered\ninsignificant copy by the logic in step 4 described in:\n\n    http://thread.gmane.org/gmane.comp.version-control.git/28826\n\nI didn't actually tried to follow what the code does to your exact input,\nthough.\n"}]}