diff options
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/diff.c b/src/diff.c index b21dfaf90..b845f9e8c 100644 --- a/src/diff.c +++ b/src/diff.c @@ -35,10 +35,10 @@ static bool diff_path_matches_pathspec(git_diff_list *diff, const char *path) return true; git_vector_foreach(&diff->pathspec, i, match) { - int result = git__fnmatch(match->pattern, path, 0); + int result = p_fnmatch(match->pattern, path, 0); /* if we didn't match, look for exact dirname prefix match */ - if (result == GIT_ENOMATCH && + if (result == FNM_NOMATCH && (match->flags & GIT_ATTR_FNMATCH_HASWILD) == 0 && strncmp(path, match->pattern, match->length) == 0 && path[match->length] == '/') @@ -46,9 +46,6 @@ static bool diff_path_matches_pathspec(git_diff_list *diff, const char *path) if (result == 0) return (match->flags & GIT_ATTR_FNMATCH_NEGATIVE) ? false : true; - - if (result != GIT_ENOMATCH) - giterr_clear(); } return false; |