diff: preparse --diff-filter string argument
Instead of running strchr() on the list of status characters over and over again, parse the --diff-filter option into bitfields and use the bits to see if the change to the filepair matches the status requested. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
5
diff.h
5
diff.h
@ -103,12 +103,15 @@ enum diff_words_type {
|
||||
};
|
||||
|
||||
struct diff_options {
|
||||
const char *filter;
|
||||
const char *orderfile;
|
||||
const char *pickaxe;
|
||||
const char *single_follow;
|
||||
const char *a_prefix, *b_prefix;
|
||||
unsigned flags;
|
||||
|
||||
/* diff-filter bits */
|
||||
unsigned int filter;
|
||||
|
||||
int use_color;
|
||||
int context;
|
||||
int interhunkcontext;
|
||||
|
||||
Reference in New Issue
Block a user