diff: introduce DIFF_PICKAXE_KINDS_MASK
Currently the check whether to perform pickaxing is done via checking
`diffopt->pickaxe`, which contains the command line argument that we
want to pickaxe for. Soon we'll introduce a new type of pickaxing, that
will not store anything in the `.pickaxe` field, so let's migrate the
check to be dependent on pickaxe_opts.
It is not enough to just replace the check for pickaxe by pickaxe_opts,
because flags might be set, but pickaxing was not requested ('-i').
To cope with that, introduce a mask to check only for the bits indicating
the modes of operation.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c1ddc4610c
commit
cf63051ada
2
diff.h
2
diff.h
@@ -326,6 +326,8 @@ extern void diff_setup_done(struct diff_options *);
|
||||
#define DIFF_PICKAXE_KIND_S 4 /* traditional plumbing counter */
|
||||
#define DIFF_PICKAXE_KIND_G 8 /* grep in the patch */
|
||||
|
||||
#define DIFF_PICKAXE_KINDS_MASK (DIFF_PICKAXE_KIND_S | DIFF_PICKAXE_KIND_G)
|
||||
|
||||
#define DIFF_PICKAXE_IGNORE_CASE 32
|
||||
|
||||
extern void diffcore_std(struct diff_options *);
|
||||
|
||||
Reference in New Issue
Block a user