summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-17 15:05:46 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-17 16:23:34 -0700
commit1ecc1cbd3a7642c4f517d086d7b45d6341172dfe (patch)
tree33743a44c6b9c89d7688f0a00512c45e523f6f5e /diff.h
parent08578fa13eeec7079101f7ac52208aec83d54c62 (diff)
downloadgit-1ecc1cbd3a7642c4f517d086d7b45d6341172dfe.tar.gz
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>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/diff.h b/diff.h
index 78b4091dd5..a36720752f 100644
--- a/diff.h
+++ b/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;