From 367cec1c024c3849cb32eaac15884a4adfefe1de Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 27 May 2005 15:55:28 -0700 Subject: [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 Signed-off-by: Linus Torvalds --- diff-files.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'diff-files.c') diff --git a/diff-files.c b/diff-files.c index c9c914be1..cf7721928 100644 --- a/diff-files.c +++ b/diff-files.c @@ -14,6 +14,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; static int silent = 0; static void show_unmerge(const char *path) @@ -54,6 +55,8 @@ int main(int argc, const char **argv) diff_setup_opt |= DIFF_SETUP_REVERSE; else if (!strcmp(argv[1], "-S")) pickaxe = argv[1] + 2; + else if (!strcmp(argv[1], "--pickaxe-all")) + pickaxe_opts = DIFF_PICKAXE_ALL; else if (!strncmp(argv[1], "-M", 2)) { diff_score_opt = diff_scoreopt_parse(argv[1]); detect_rename = DIFF_DETECT_RENAME; @@ -116,7 +119,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 (1 < argc) diffcore_pathspec(argv + 1); diff_flush(diff_output_format, 1); -- cgit v1.2.1