diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-02-01 02:02:52 +0400 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-02-01 02:02:52 +0400 |
commit | e4eb94a2559ca669412d318112a200ead1222466 (patch) | |
tree | bc1dd585f043297996d85d868f84477e4bc6a070 | |
parent | adc9bdb3b1428b8edf067ab17c26ef15ec1ac8a7 (diff) |
Fix issue with ignoring whole directories
Now that is_dir is calculated correctly for attr/ignore paths,
it is possible to use it so that ignoring "dir/" will properly
match the directory name and ignore the entire directory.
-rw-r--r-- | src/attr_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/attr_file.c b/src/attr_file.c index 74b2b6d12..7911381ea 100644 --- a/src/attr_file.c +++ b/src/attr_file.c @@ -200,6 +200,8 @@ int git_attr_fnmatch__match( if (match->flags & GIT_ATTR_FNMATCH_FULLPATH) matched = p_fnmatch(match->pattern, path->path, FNM_PATHNAME); + else if (path->is_dir) + matched = p_fnmatch(match->pattern, path->basename, FNM_LEADING_DIR); else matched = p_fnmatch(match->pattern, path->basename, 0); |