pickaxe: die when --find-object and --pickaxe-all are combined
Neither the --pickaxe-all documentation nor --find-object's has ever suggested that you can combine the two. Seef506b8e8b5
(git log/diff: add -G<regexp> that greps in the patch text, 2010-08-23) and15af58c1ad
(diffcore: add a pickaxe option to find a specific blob, 2018-01-04). But we've silently tolerated it, which makes the logic in diffcore_pickaxe() harder to reason about. Let's assert that we won't have the two combined. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
188e9e28c5
commit
d26ec88009
3
diff.c
3
diff.c
@ -4631,6 +4631,9 @@ void diff_setup_done(struct diff_options *options)
|
||||
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_G_REGEX_MASK))
|
||||
die(_("-G and --pickaxe-regex are mutually exclusive, use --pickaxe-regex with -S"));
|
||||
|
||||
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_ALL_OBJFIND_MASK))
|
||||
die(_("---pickaxe-all and --find-object are mutually exclusive, use --pickaxe-all with -G and -S"));
|
||||
|
||||
/*
|
||||
* Most of the time we can say "there are changes"
|
||||
* only by checking if there are changed paths, but
|
||||
|
Reference in New Issue
Block a user