From e4eb94a2559ca669412d318112a200ead1222466 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Tue, 31 Jan 2012 14:02:52 -0800 Subject: 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. --- src/attr_file.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/attr_file.c') 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); -- cgit v1.2.3