Re: git-blame not tracking copies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy Parkins <andyparkins@xxxxxxxxx> writes:

> All git-blame commands are "git-blame -C1 -C1"

I am sick and not functioning well today, so will not be able to
review what is happening with your example deeply, but here are
some comments to get you started digging.

There is a built-in sanity valve in git-blame that refuses to
pass down the blame via -M/-C for really trivial hunks.  Without
such safety, all the empty lines in the latest revision would be
attributed to a random empty line in a random file in the root
commit ;-).

By default, the sanity valve is set to refuse a hunk that has 20
or 40 alnum characters.  These values seem to be appropriate for
real life projects, but obviously the real-world case would be
very different from a made-up "each commit changes one-line"
test case and it would be understandable that the command would
behave differently.

Also with real-life projects, probably depending on the coding
style and merge patterns, I would not be surprised if there are
rooms to tweak the heuristics.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]