Merge branch 'sb/diff-blobfind-pickaxe'
"diff" family of commands learned "--find-object=<object-id>" option to limit the findings to changes that involve the named object. * sb/diff-blobfind-pickaxe: diff: use HAS_MULTI_BITS instead of counting bits manually diff: properly error out when combining multiple pickaxe options diffcore: add a pickaxe option to find a specific blob diff: introduce DIFF_PICKAXE_KINDS_MASK diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bit diff.h: make pickaxe_opts an unsigned bit field
This commit is contained in:
@ -2078,7 +2078,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
|
||||
revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_ERE;
|
||||
} else if (!strcmp(arg, "--regexp-ignore-case") || !strcmp(arg, "-i")) {
|
||||
revs->grep_filter.ignore_case = 1;
|
||||
revs->diffopt.flags.pickaxe_ignore_case = 1;
|
||||
revs->diffopt.pickaxe_opts |= DIFF_PICKAXE_IGNORE_CASE;
|
||||
} else if (!strcmp(arg, "--fixed-strings") || !strcmp(arg, "-F")) {
|
||||
revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_FIXED;
|
||||
} else if (!strcmp(arg, "--perl-regexp") || !strcmp(arg, "-P")) {
|
||||
@ -2409,11 +2409,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
|
||||
revs->diff = 1;
|
||||
|
||||
/* Pickaxe, diff-filter and rename following need diffs */
|
||||
if (revs->diffopt.pickaxe ||
|
||||
if ((revs->diffopt.pickaxe_opts & DIFF_PICKAXE_KINDS_MASK) ||
|
||||
revs->diffopt.filter ||
|
||||
revs->diffopt.flags.follow_renames)
|
||||
revs->diff = 1;
|
||||
|
||||
if (revs->diffopt.objfind)
|
||||
revs->simplify_history = 0;
|
||||
|
||||
if (revs->topo_order)
|
||||
revs->limited = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user