[PATCH] Pickaxe fixes.
A bug in the command line argument parsing code was making pickaxe not to work at all in diff-cache and diff-files commands. Embarrassingly enough, the working pickaxe in diff-tree tells me that it was not working in these two commands from day one. This patch fixes it. Also updates the documentation to describe the --pickaxe-all option. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
6af1f0192f
commit
e25de75696
@ -9,7 +9,7 @@ git-diff-cache - Compares content and mode of blobs between the cache and reposi
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git-diff-cache' [-p] [-r] [-z] [-m] [-M] [-R] [-C] [-S<string>] [--cached] <tree-ish> [<path>...]
|
'git-diff-cache' [-p] [-r] [-z] [-m] [-M] [-R] [-C] [-S<string>] [--pickaxe-all] [--cached] <tree-ish> [<path>...]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
@ -44,6 +44,10 @@ OPTIONS
|
|||||||
-S<string>::
|
-S<string>::
|
||||||
Look for differences that contains the change in <string>.
|
Look for differences that contains the change in <string>.
|
||||||
|
|
||||||
|
--pickaxe-all::
|
||||||
|
When -S finds a change, show all the changes in that
|
||||||
|
changeset, not just the files that contains the change
|
||||||
|
in <string>.
|
||||||
|
|
||||||
-R::
|
-R::
|
||||||
Output diff in reverse.
|
Output diff in reverse.
|
||||||
|
@ -9,7 +9,7 @@ git-diff-files - Compares files in the working tree and the cache
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git-diff-files' [-p] [-q] [-r] [-z] [-M] [-C] [-R] [-S<string>] [<pattern>...]
|
'git-diff-files' [-p] [-q] [-r] [-z] [-M] [-C] [-R] [-S<string>] [--pickaxe-all] [<pattern>...]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
@ -38,6 +38,10 @@ OPTIONS
|
|||||||
-S<string>::
|
-S<string>::
|
||||||
Look for differences that contains the change in <string>.
|
Look for differences that contains the change in <string>.
|
||||||
|
|
||||||
|
--pickaxe-all::
|
||||||
|
When -S finds a change, show all the changes in that
|
||||||
|
changeset, not just the files that contains the change
|
||||||
|
in <string>.
|
||||||
|
|
||||||
-r::
|
-r::
|
||||||
This flag does not mean anything. It is there only to match
|
This flag does not mean anything. It is there only to match
|
||||||
|
@ -9,7 +9,7 @@ git-diff-tree - Compares the content and mode of blobs found via two tree object
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git-diff-tree' [-p] [-r] [-z] [--stdin] [-M] [-R] [-C] [-S<string>] [-m] [-s] [-v] [-t] <tree-ish> <tree-ish> [<pattern>]\*
|
'git-diff-tree' [-p] [-r] [-z] [--stdin] [-M] [-R] [-C] [-S<string>] [--pickaxe-all] [-m] [-s] [-v] [-t] <tree-ish> <tree-ish> [<pattern>]\*
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
@ -45,6 +45,11 @@ OPTIONS
|
|||||||
-S<string>::
|
-S<string>::
|
||||||
Look for differences that contains the change in <string>.
|
Look for differences that contains the change in <string>.
|
||||||
|
|
||||||
|
--pickaxe-all::
|
||||||
|
When -S finds a change, show all the changes in that
|
||||||
|
changeset, not just the files that contains the change
|
||||||
|
in <string>.
|
||||||
|
|
||||||
-r::
|
-r::
|
||||||
recurse
|
recurse
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ int main(int argc, const char **argv)
|
|||||||
diff_setup_opt |= DIFF_SETUP_REVERSE;
|
diff_setup_opt |= DIFF_SETUP_REVERSE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strcmp(arg, "-S")) {
|
if (!strncmp(arg, "-S", 2)) {
|
||||||
pickaxe = arg + 2;
|
pickaxe = arg + 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ int main(int argc, const char **argv)
|
|||||||
diff_output_format = DIFF_FORMAT_MACHINE;
|
diff_output_format = DIFF_FORMAT_MACHINE;
|
||||||
else if (!strcmp(argv[1], "-R"))
|
else if (!strcmp(argv[1], "-R"))
|
||||||
diff_setup_opt |= DIFF_SETUP_REVERSE;
|
diff_setup_opt |= DIFF_SETUP_REVERSE;
|
||||||
else if (!strcmp(argv[1], "-S"))
|
else if (!strncmp(argv[1], "-S", 2))
|
||||||
pickaxe = argv[1] + 2;
|
pickaxe = argv[1] + 2;
|
||||||
else if (!strcmp(argv[1], "--pickaxe-all"))
|
else if (!strcmp(argv[1], "--pickaxe-all"))
|
||||||
pickaxe_opts = DIFF_PICKAXE_ALL;
|
pickaxe_opts = DIFF_PICKAXE_ALL;
|
||||||
|
Loading…
Reference in New Issue
Block a user