libgit2/tests-clar/diff
Russell Belfer ccfa68055c Fix some diff ignores and submodule dirty workdir
This started out trying to look at the problems from issue #1425
and gradually grew to a broader set of fixes.  There are two core
things fixed here:

1. When you had an ignore like "/bin" which is rooted at the top
   of your tree, instead of immediately adding the "bin/" entry
   as an ignored item in the diff, we were returning all of the
   direct descendants of the directory as ignored items.  This
   changes things to immediately ignore the directory.  Note that
   this effects the behavior in test_status_ignore__subdirectories
   so that we no longer exactly match core gits ignore behavior,
   but the new behavior probably makes more sense (i.e. we now
   will include an ignored directory inside an untracked directory
   that we previously would have left off).
2. When a submodule only contained working directory changes, the
   diff code was always considering it unmodified which was just
   an outright bug. The HEAD SHA of the submodule matches the SHA
   in the parent repo index, and since the SHAs matches, the diff
   code was overwriting the actual status with UNMODIFIED.

These fixes broke existing tests test_diff_workdir__submodules and
test_status_ignore__subdirectories but looking it over, I actually
think the new results are correct and the old results were wrong.
@nulltoken had actually commented on the subdirectory ignore issue
previously.

I also included in the tests some debugging versions of the
shared iteration callback routines that print status or diff
information.  These aren't used actively in the tests, but can be
quickly swapped in to test code to give a better picture of what
is being scanned in some of the complex test scenarios.
2013-03-25 23:58:40 -07:00
..
blob.c Initial integration of similarity metric to diff 2013-02-21 12:40:33 -08:00
diff_helpers.c Fix some diff ignores and submodule dirty workdir 2013-03-25 23:58:40 -07:00
diff_helpers.h Fix some diff ignores and submodule dirty workdir 2013-03-25 23:58:40 -07:00
diffiter.c Replace diff delta binary with flags 2013-02-20 15:10:21 -08:00
index.c Fix some leaks and (possibly) dangling pointers in tests 2012-12-19 08:04:31 +01:00
iterator.c Three submodule status bug fixes 2013-03-18 17:24:13 -07:00
patch.c Fix a few leaks 2013-03-04 00:21:56 +01:00
rename.c handle small files in similarity metrics 2013-03-11 12:47:01 -05:00
tree.c Test fixes and cleanup 2013-03-25 14:03:16 -07:00
workdir.c Fix some diff ignores and submodule dirty workdir 2013-03-25 23:58:40 -07:00