libgit2/libgit2 — pull request #1411 by arrbee (2013-03-13 22:05:46+00:00)
Title: Fix workdir iterator bugs

This fixes two bugs with the workdir iterator depth check:

1. the depth was not being decremented correctly, and
2. empty directories were counting against the depth even though a frame was not being created for them.

This also fixes a bug with the ENOTFOUND return code for workdir iterators when you attempt to advance_into an empty directory. Actually, that works correctly, but it was incorrectly being propogated into regular advance() calls in some circumstances.

Added new tests for the above that create a huge hierarchy on the fly and try using the workdir iterator to traverse it.

The first of these workdir iterator bugs was reported as libgit2/libgit2sharp#363 and the other two issues were uncovered by the new tests that I wrote.