git-pickaxe -M: blame line movements within a file.
commitd24bba8008d8e537cb48e9760f7621cbe7ae9e38
authorJunio C Hamano <junkio@cox.net>
Fri, 20 Oct 2006 01:49:30 +0000 (19 18:49 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 20 Oct 2006 07:27:05 +0000 (20 00:27 -0700)
tree4ed60a379c34a80de441e6a0808b25c20555cb68
parentcee7f245dcaef6dade28464f59420095a9949aac
git-pickaxe -M: blame line movements within a file.

This makes pickaxe more intelligent than the classic blame.

A typical example is a change that moves one static C function
from lower part of the file to upper part of the same file,
because you added a new caller in the middle.

The versions in the parent and the child would look like this:

        parent            child

        A                 static foo() {
        B                 ...
        C                 }
        D                 A
        E                 B
        F                 C
        G                 D
        static foo() {    ... call foo();
        ...               E
        }                 F
        H                 G
                          H

With the classic blame algorithm, we can blame lines A B C D E F
G and H to the parent.  The child is guilty of introducing the
line "... call foo();", and the blame is placed on the child.
However, the classic blame algorithm fails to notice that the
implementation of foo() at the top of the file is not new, and
moved from the lower part of the parent.

This commit introduces detection of such line movements, and
correctly blames the lines that were simply moved in the file to
the parent.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-pickaxe.txt
builtin-pickaxe.c