summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6af1f01)
raw | patch | inline | side by side (parent: 6af1f01)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 28 May 2005 09:53:43 +0000 (02:53 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 29 May 2005 18:42:29 +0000 (11:42 -0700) |
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>
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>
index 35253b11b34b8b302ac264eaf90eadcdc2bf1555..0e2e6d0a93ba10e32861071fa918a1a1e966467a 100644 (file)
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
-----------
-S<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::
Output diff in reverse.
index 9f9bb1453121ae9f8641ca65dfe70d2575ffa2f9..7013640242a71602477847e34dfe2b03b1ece03f 100644 (file)
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
-----------
-S<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::
This flag does not mean anything. It is there only to match
index 77b1fb1799870ed6017f452b26ea940be05d4036..f44e8cf135ba41b2ff98637583d587a103d6202c 100644 (file)
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
-----------
-S<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::
recurse
diff --git a/diff-cache.c b/diff-cache.c
index 66e7bdb62e80f7dd114c72171842691c3a237df7..1e0fda52993f76afc0ee866f3e29a43469fcfd7c 100644 (file)
--- a/diff-cache.c
+++ b/diff-cache.c
diff_setup_opt |= DIFF_SETUP_REVERSE;
continue;
}
- if (!strcmp(arg, "-S")) {
+ if (!strncmp(arg, "-S", 2)) {
pickaxe = arg + 2;
continue;
}
diff --git a/diff-files.c b/diff-files.c
index bd0eb95f85f1ebfd684e4177ca85c54b585da138..8ab7915977dc2a97fa49ad813a89c676c7208915 100644 (file)
--- a/diff-files.c
+++ b/diff-files.c
diff_output_format = DIFF_FORMAT_MACHINE;
else if (!strcmp(argv[1], "-R"))
diff_setup_opt |= DIFF_SETUP_REVERSE;
- else if (!strcmp(argv[1], "-S"))
+ else if (!strncmp(argv[1], "-S", 2))
pickaxe = argv[1] + 2;
else if (!strcmp(argv[1], "--pickaxe-all"))
pickaxe_opts = DIFF_PICKAXE_ALL;