diff --git a/diff.c b/diff.c index a872bdcac13e069cc4b694a414298e6c38d0dd3c..42858d4c7d058b876b0279bdefdb23850e8532ad 100644 --- a/diff.c +++ b/diff.c @@ -4123,6 +4123,9 @@ void diff_setup_done(struct diff_options *options) if (count > 1) die(_("--name-only, --name-status, --check and -s are mutually exclusive")); + if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK)) + die(_("-G, -S and --find-object are mutually exclusive")); + /* * Most of the time we can say "there are changes" * only by checking if there are changed paths, but diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index 72bb5a9514f3e806115d30cc669c7ab6855247fb..239ce5122b3a45bec211e0c20113385c0e37805d 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -251,7 +251,6 @@ void diffcore_pickaxe(struct diff_options *o) } } - /* Might want to warn when both S and G are on; I don't care... */ pickaxe(&diff_queued_diff, o, regexp, kws, (opts & DIFF_PICKAXE_KIND_G) ? diff_grep : has_changes);