libgit2/libgit2 — pull request #610 by arrbee (2012-03-22 16:28:32+00:00)
Title: Rewrite status using diff

Core git uses the same core code to do diff and status. This is a rewrite of libgit2 status using the new diff infrastructure.

I added a new version of status `git_status_foreach_ext()` which takes an additional options configuration. This can be used to control the order in which status is reported and to control whether untracked, ignored, or unmodified files will be included in the status report. Then I rewrote `git_status_foreach()` using the extended version.

For now, I have left the old status implementation untouched at the bottom of the `status.c` file (except that I renamed the old version to `git_status_foreach_old()`). This makes the diff a little easier to read and it means we can do comparative testing until we are ready to merge.

I had held off on creating the pull request because in testing submodule support I identified a bug and I have not had time to fix it yet, but it is probably time to get some other eyes on this while I work on the bug.

I incorporated @nulltoken's issue #592 tests into this PR, copying them over from his pull request #601. I also added the new submodule tests.