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

3 messages from 2011-06-08 to 2011-06-09. Participants: Andrew Wong, Junio C Hamano.
Thread: https://gitlist.dev/t/27573

## Andrew Wong, 2011-06-08 05:09

Subject: blame -C: adding a line in moved content sometimes affect blame result
Message-ID: <4DEF041A.9070003@gmail.com>
URL: https://gitlist.dev/e/4DEF041A.9070003%40gmail.com

```
I've attached a script for illustration.

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. I looked around in blame.c, and this feels like a boundary case 
somewhere inside find_copy_in_blob? Any clues?

```

## Andrew Wong, 2011-06-09 01:31

Subject: Re: blame -C: adding a line in moved content sometimes affect blame result
Message-ID: <4DF02280.8080004@gmail.com>
URL: https://gitlist.dev/e/4DF02280.8080004%40gmail.com
In-Reply-To: <4DEF041A.9070003@gmail.com>

```
On 11-06-08 1:09 AM, Andrew Wong wrote:
> I've attached a script for illustration.
>
> 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. I looked around in blame.c, and this feels 
> like a boundary case somewhere inside find_copy_in_blob? Any clues?
Anyone has any ideas regarding this issue?

```

## Junio C Hamano, 2011-06-09 03:25

Subject: Re: blame -C: adding a line in moved content sometimes affect blame result
Message-ID: <7v4o3zznx6.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4o3zznx6.fsf%40alter.siamese.dyndns.org
In-Reply-To: <4DEF041A.9070003@gmail.com>

```
Andrew Wong <andrew.kw.w@gmail.com> writes:
>
> 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.

```
