summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-01-04 22:50:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-01-04 23:02:40 (GMT)
commitcf63051adad03e827e0313a57db0a79ad39a04a0 (patch)
tree5e2459e39fcfde5c7d878dcd8bd7df8406b6517b /diff.c
parentc1ddc4610c553b06591aac74b610b56448cbb976 (diff)
downloadgit-cf63051adad03e827e0313a57db0a79ad39a04a0.zip
git-cf63051adad03e827e0313a57db0a79ad39a04a0.tar.gz
git-cf63051adad03e827e0313a57db0a79ad39a04a0.tar.bz2
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 0763e89..5508745 100644
--- a/diff.c
+++ b/diff.c
@@ -4173,7 +4173,7 @@ void diff_setup_done(struct diff_options *options)
/*
* Also pickaxe would not work very well if you do not say recursive
*/
- if (options->pickaxe)
+ if (options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK)
options->flags.recursive = 1;
/*
* When patches are generated, submodules diffed against the work tree
@@ -5777,7 +5777,7 @@ void diffcore_std(struct diff_options *options)
if (options->break_opt != -1)
diffcore_merge_broken();
}
- if (options->pickaxe)
+ if (options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK)
diffcore_pickaxe(options);
if (options->orderfile)
diffcore_order(options->orderfile);