summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-07-09 18:21:31 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-07-09 18:21:31 +0200
commit9847d80ddc97b85ca38e158dc4781f0a3c6081ca (patch)
tree943d25b195b9eb2a90c355707d09f71b60d195c5 /src
parentcd85ce6040485ba3258555e33ae1641ca62097ff (diff)
parent63924435a103d34315ad9a4851d84b2b052aca38 (diff)
downloadlibgit2-9847d80ddc97b85ca38e158dc4781f0a3c6081ca.tar.gz
Merge pull request #3281 from ethomson/wildcard_filters
filters: custom filters with wildcard attributes
Diffstat (limited to 'src')
-rw-r--r--src/filter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filter.c b/src/filter.c
index e25d37c35..70c4fa382 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -433,8 +433,11 @@ static int filter_list_check_attributes(
want_type = git_attr_value(want);
found_type = git_attr_value(strs[i]);
- if (want_type != found_type ||
- (want_type == GIT_ATTR_VALUE_T && strcmp(want, strs[i])))
+ if (want_type != found_type)
+ error = GIT_ENOTFOUND;
+ else if (want_type == GIT_ATTR_VALUE_T &&
+ strcmp(want, strs[i]) &&
+ strcmp(want, "*"))
error = GIT_ENOTFOUND;
}