diff options
author | Stefan Beller <sbeller@google.com> | 2018-01-05 01:50:41 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-05 02:02:40 +0300 |
commit | cf63051adad03e827e0313a57db0a79ad39a04a0 (patch) | |
tree | 5e2459e39fcfde5c7d878dcd8bd7df8406b6517b /builtin/log.c | |
parent | c1ddc4610c553b06591aac74b610b56448cbb976 (diff) |
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 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c index 6c1fa896ad..bd6f2d1efb 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -180,8 +180,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, if (rev->show_notes) init_display_notes(&rev->notes_opt); - if (rev->diffopt.pickaxe || rev->diffopt.filter || - rev->diffopt.flags.follow_renames) + if ((rev->diffopt.pickaxe_opts & DIFF_PICKAXE_KINDS_MASK) || + rev->diffopt.filter || rev->diffopt.flags.follow_renames) rev->always_show_header = 0; if (source) |