From c1ddc4610c553b06591aac74b610b56448cbb976 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 4 Jan 2018 14:50:40 -0800 Subject: diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bit Currently flags for pickaxing are found in different places. Unify the flags into the `pickaxe_opts` field, which will contain any pickaxe related flags. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diffcore-pickaxe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'diffcore-pickaxe.c') diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index 9476bd2108..4b5d88ea46 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -222,11 +222,11 @@ void diffcore_pickaxe(struct diff_options *o) if (opts & (DIFF_PICKAXE_REGEX | DIFF_PICKAXE_KIND_G)) { int cflags = REG_EXTENDED | REG_NEWLINE; - if (o->flags.pickaxe_ignore_case) + if (o->pickaxe_opts & DIFF_PICKAXE_IGNORE_CASE) cflags |= REG_ICASE; regcomp_or_die(®ex, needle, cflags); regexp = ®ex; - } else if (o->flags.pickaxe_ignore_case && + } else if (o->pickaxe_opts & DIFF_PICKAXE_IGNORE_CASE && has_non_ascii(needle)) { struct strbuf sb = STRBUF_INIT; int cflags = REG_NEWLINE | REG_ICASE; @@ -236,7 +236,7 @@ void diffcore_pickaxe(struct diff_options *o) strbuf_release(&sb); regexp = ®ex; } else { - kws = kwsalloc(o->flags.pickaxe_ignore_case + kws = kwsalloc(o->pickaxe_opts & DIFF_PICKAXE_IGNORE_CASE ? tolower_trans_tbl : NULL); kwsincr(kws, needle, strlen(needle)); kwsprep(kws); -- cgit v1.2.3