Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-30 00:49:03 +0400
committerJunio C Hamano <gitster@pobox.com>2010-09-30 00:49:03 +0400
commitb3c16ee454effda5ec8033ab665249710f622699 (patch)
tree9c50b0b2452c5332e7f37d769f5eec5484499e0e /diff.c
parentae893e097ecbcbd8c6bea50017eb8cedddc5eaba (diff)
parentbf1dfc31032bf6195be63dd92d0b67906e4ff4f8 (diff)
Merge branch 'jc/pickaxe-grep'
* jc/pickaxe-grep: diff/log -G<pattern>: tests git log/diff: add -G<regexp> that greps in the patch text diff: pass the entire diff-options to diffcore_pickaxe() gitdiffcore doc: update pickaxe description
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 0e2e872e0b..71efa8edd4 100644
--- a/diff.c
+++ b/diff.c
@@ -3271,12 +3271,17 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
}
else if ((argcount = short_opt('S', av, &optarg))) {
options->pickaxe = optarg;
+ options->pickaxe_opts |= DIFF_PICKAXE_KIND_S;
+ return argcount;
+ } else if ((argcount = short_opt('G', av, &optarg))) {
+ options->pickaxe = optarg;
+ options->pickaxe_opts |= DIFF_PICKAXE_KIND_G;
return argcount;
}
else if (!strcmp(arg, "--pickaxe-all"))
- options->pickaxe_opts = DIFF_PICKAXE_ALL;
+ options->pickaxe_opts |= DIFF_PICKAXE_ALL;
else if (!strcmp(arg, "--pickaxe-regex"))
- options->pickaxe_opts = DIFF_PICKAXE_REGEX;
+ options->pickaxe_opts |= DIFF_PICKAXE_REGEX;
else if ((argcount = short_opt('O', av, &optarg))) {
options->orderfile = optarg;
return argcount;
@@ -4176,7 +4181,7 @@ void diffcore_std(struct diff_options *options)
diffcore_merge_broken();
}
if (options->pickaxe)
- diffcore_pickaxe(options->pickaxe, options->pickaxe_opts);
+ diffcore_pickaxe(options);
if (options->orderfile)
diffcore_order(options->orderfile);
if (!options->found_follow)