summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-07 09:17:20 -0700
committerRussell Belfer <rb@github.com>2013-08-09 11:41:41 -0700
commitba8b8c040744edb9bc832a67646e0126636753bb (patch)
treee82808b0e09eb1b344f76b6f1d76883967e487d4 /src/path.c
parentd1be9e4ca18caa37c69afb988994a99cd137a3b8 (diff)
downloadlibgit2-ba8b8c040744edb9bc832a67646e0126636753bb.tar.gz
Improve building ignore file lists
The routines to push and pop ignore files while traversing a directory had some issues. In particular, setting up the initial list would sometimes push an ignore file before it ought to be applied if the starting path was a directory containing an ignore file. Also, the pop function was not always matching the right part of the path and would fail to pop ignores from the list in some cases. This adds some tests that exercise a particular problematic case and then fixes the problems that I could find related to this. At some point, I'd like to isolate this ignore rule management code and rewrite it, but that's a larger project and right now, I'll opt to just try to fix the broken behaviors.
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c
index 6437979d5..b81675b49 100644
--- a/src/path.c
+++ b/src/path.c
@@ -603,7 +603,7 @@ int git_path_find_dir(git_buf *dir, const char *path, const char *base)
}
/* call dirname if this is not a directory */
- if (!error && git_path_isdir(dir->ptr) == false)
+ if (!error) /* && git_path_isdir(dir->ptr) == false) */
error = git_path_dirname_r(dir, dir->ptr);
if (!error)