summaryrefslogtreecommitdiff
path: root/diff-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-27 22:55:28 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-29 18:17:43 (GMT)
commit367cec1c024c3849cb32eaac15884a4adfefe1de (patch)
treeff5ff9663406484cfac8d6dee415971e62eba8ef /diff-cache.c
parentbe020332a152ef95e0e8435fb69d8c02d5da29bb (diff)
downloadgit-367cec1c024c3849cb32eaac15884a4adfefe1de.zip
git-367cec1c024c3849cb32eaac15884a4adfefe1de.tar.gz
git-367cec1c024c3849cb32eaac15884a4adfefe1de.tar.bz2
[PATCH] Add --pickaxe-all to diff-* brothers.
When --pickaxe-all is given in addition to -S, pickaxe shows the entire diffs contained in the changeset, not just the diffs for the filepair that touched the sought-after string. This is useful to see the changes in context. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-cache.c')
-rw-r--r--diff-cache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/diff-cache.c b/diff-cache.c
index 963c628..0a6720d 100644
--- a/diff-cache.c
+++ b/diff-cache.c
@@ -8,6 +8,7 @@ static int detect_rename = 0;
static int diff_setup_opt = 0;
static int diff_score_opt = 0;
static const char *pickaxe = NULL;
+static int pickaxe_opts = 0;
/* A file entry went away or appeared */
static void show_file(const char *prefix, struct cache_entry *ce, unsigned char *sha1, unsigned int mode)
@@ -209,6 +210,10 @@ int main(int argc, const char **argv)
pickaxe = arg + 2;
continue;
}
+ if (!strcmp(arg, "--pickaxe-all")) {
+ pickaxe_opts = DIFF_PICKAXE_ALL;
+ continue;
+ }
if (!strcmp(arg, "-m")) {
match_nonexisting = 1;
continue;
@@ -238,7 +243,7 @@ int main(int argc, const char **argv)
if (detect_rename)
diffcore_rename(detect_rename, diff_score_opt);
if (pickaxe)
- diffcore_pickaxe(pickaxe);
+ diffcore_pickaxe(pickaxe, pickaxe_opts);
if (pathspec)
diffcore_pathspec(pathspec);
diff_flush(diff_output_format, 1);