libgit2/libgit2 — pull request #545 by arrbee (2012-01-31 22:11:41+00:00)
Title: Status bug fixes

This branch has fixes for a few bugs related to status and ignore handling. I broke it into three commits to separate out the fixes.

The main thing I'd like some eyes on in addition to my own is the first commit: 5d3cd4e3 which fixes the assertion failure that `git_status_foreach` has when it encounters a submodule. This isn't a fantastic fix, but it should resolve the crash and preserve the existing behavior for situations where there are no submodules.

The other two fixes are related to ignore handling. First, I was accidentally using a relative path when deciding if an given file was a directory or not. This led to the "is_dir" flag being wrong (unless you happened to cd to the root of the repo) and hence directory ignore rules were evaluated incorrectly. Second, with a rule like "dir/" which should ignore the whole directory, I was not properly looking at directory prefixes in the fnmatch call which lead to some files not being ignored correctly.