diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-17 13:50:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-17 13:50:26 -0700 |
commit | f6c64c648ade843b44d517b2de41b8b882f112c0 (patch) | |
tree | e1ca564c6a9d4ceff87c40944bbb14211207c767 /pathspec.h | |
parent | Merge branch 'jk/ref-filter-flags-cleanup' (diff) | |
parent | pathspec: allow escaped query values (diff) | |
download | tgif-f6c64c648ade843b44d517b2de41b8b882f112c0.tar.xz |
Merge branch 'bw/attr-pathspec'
The pathspec mechanism learned to further limit the paths that
match the pattern to those that have specified attributes attached
via the gitattributes mechanism.
* bw/attr-pathspec:
pathspec: allow escaped query values
pathspec: allow querying for attributes
Diffstat (limited to 'pathspec.h')
-rw-r--r-- | pathspec.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pathspec.h b/pathspec.h index 49fd823ddf..55e976972c 100644 --- a/pathspec.h +++ b/pathspec.h @@ -8,13 +8,15 @@ #define PATHSPEC_GLOB (1<<3) #define PATHSPEC_ICASE (1<<4) #define PATHSPEC_EXCLUDE (1<<5) +#define PATHSPEC_ATTR (1<<6) #define PATHSPEC_ALL_MAGIC \ (PATHSPEC_FROMTOP | \ PATHSPEC_MAXDEPTH | \ PATHSPEC_LITERAL | \ PATHSPEC_GLOB | \ PATHSPEC_ICASE | \ - PATHSPEC_EXCLUDE) + PATHSPEC_EXCLUDE | \ + PATHSPEC_ATTR) #define PATHSPEC_ONESTAR 1 /* the pathspec pattern satisfies GFNM_ONESTAR */ @@ -31,6 +33,17 @@ struct pathspec { int len, prefix; int nowildcard_len; int flags; + int attr_match_nr; + struct attr_match { + char *value; + enum attr_match_mode { + MATCH_SET, + MATCH_UNSET, + MATCH_VALUE, + MATCH_UNSPECIFIED + } match_mode; + } *attr_match; + struct attr_check *attr_check; } *items; }; |