diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-06 11:38:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-06 11:38:59 -0700 |
commit | 12508a83549e59f0160ada423997069bf4a4003f (patch) | |
tree | 97be7bcf3625b3f1a12d326a3d7aa3c57ab9b2d3 | |
parent | 6a269e52a5d0c82567c5b39cc194cc90f9fa9156 (diff) | |
parent | f870899864e077a54776af838c6476d5850cfaaf (diff) | |
download | git-12508a83549e59f0160ada423997069bf4a4003f.tar.gz |
Merge branch 'ss/exc-flag-is-a-collection-of-bits'
Code clean-up.
* ss/exc-flag-is-a-collection-of-bits:
dir: store EXC_FLAG_* values in unsigned integers
-rw-r--r-- | attr.c | 2 | ||||
-rw-r--r-- | dir.c | 8 | ||||
-rw-r--r-- | dir.h | 8 |
3 files changed, 9 insertions, 9 deletions
@@ -122,7 +122,7 @@ struct pattern { const char *pattern; int patternlen; int nowildcardlen; - int flags; /* EXC_FLAG_* */ + unsigned flags; /* EXC_FLAG_* */ }; /* @@ -457,7 +457,7 @@ int no_wildcard(const char *string) void parse_exclude_pattern(const char **pattern, int *patternlen, - int *flags, + unsigned *flags, int *nowildcardlen) { const char *p = *pattern; @@ -498,7 +498,7 @@ void add_exclude(const char *string, const char *base, { struct exclude *x; int patternlen; - int flags; + unsigned flags; int nowildcardlen; parse_exclude_pattern(&string, &patternlen, &flags, &nowildcardlen); @@ -798,7 +798,7 @@ void add_excludes_from_file(struct dir_struct *dir, const char *fname) int match_basename(const char *basename, int basenamelen, const char *pattern, int prefix, int patternlen, - int flags) + unsigned flags) { if (prefix == patternlen) { if (patternlen == basenamelen && @@ -823,7 +823,7 @@ int match_basename(const char *basename, int basenamelen, int match_pathname(const char *pathname, int pathlen, const char *base, int baselen, const char *pattern, int prefix, int patternlen, - int flags) + unsigned flags) { const char *name; int namelen; @@ -27,7 +27,7 @@ struct exclude { int nowildcardlen; const char *base; int baselen; - int flags; + unsigned flags; /* EXC_FLAG_* */ /* * Counting starts from 1 for line numbers in ignore files, @@ -226,10 +226,10 @@ struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, * attr.c:path_matches() */ extern int match_basename(const char *, int, - const char *, int, int, int); + const char *, int, int, unsigned); extern int match_pathname(const char *, int, const char *, int, - const char *, int, int, int); + const char *, int, int, unsigned); extern struct exclude *last_exclude_matching(struct dir_struct *dir, const char *name, int *dtype); @@ -241,7 +241,7 @@ extern struct exclude_list *add_exclude_list(struct dir_struct *dir, extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen, struct exclude_list *el, int check_index); extern void add_excludes_from_file(struct dir_struct *, const char *fname); -extern void parse_exclude_pattern(const char **string, int *patternlen, int *flags, int *nowildcardlen); +extern void parse_exclude_pattern(const char **string, int *patternlen, unsigned *flags, int *nowildcardlen); extern void add_exclude(const char *string, const char *base, int baselen, struct exclude_list *el, int srcpos); extern void clear_exclude_list(struct exclude_list *el); |