aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-19 18:49:30 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-20 00:27:05 -0700
commitd24bba8008d8e537cb48e9760f7621cbe7ae9e38 (patch)
tree4ed60a379c34a80de441e6a0808b25c20555cb68 /Documentation
parentcee7f245dcaef6dade28464f59420095a9949aac (diff)
downloadgit-d24bba8008d8e537cb48e9760f7621cbe7ae9e38.tar.gz
git-d24bba8008d8e537cb48e9760f7621cbe7ae9e38.tar.xz
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-pickaxe.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/git-pickaxe.txt b/Documentation/git-pickaxe.txt
index 7685bd0e3..ebae20ff3 100644
--- a/Documentation/git-pickaxe.txt
+++ b/Documentation/git-pickaxe.txt
@@ -7,7 +7,9 @@ git-pickaxe - Show what revision and author last modified each line of a file
SYNOPSIS
--------
-'git-pickaxe' [-c] [-l] [-t] [-f] [-n] [-p] [-L n,m] [-S <revs-file>] [<rev>] [--] <file>
+[verse]
+'git-pickaxe' [-c] [-l] [-t] [-f] [-n] [-p] [-L n,m] [-S <revs-file>]
+ [-M] [--since=<date>] [<rev>] [--] <file>
DESCRIPTION
-----------
@@ -61,6 +63,16 @@ OPTIONS
-p, --porcelain::
Show in a format designed for machine consumption.
+-M::
+ Detect moving lines in the file as well. When a commit
+ moves a block of lines in a file (e.g. the original file
+ has A and then B, and the commit changes it to B and
+ then A), traditional 'blame' algorithm typically blames
+ the lines that were moved up (i.e. B) to the parent and
+ assigns blame to the lines that were moved down (i.e. A)
+ to the child commit. With this option, both groups of
+ lines are blamed on the parent.
+
-h, --help::
Show help message.