libgit2/tests-clar/diff
Russell Belfer d958e37a48 Fix issues with git_diff_find_similar
There are a number of bugs in the rename code that only were
obvious when I started testing it against large old repos with
more complex patterns.  (The code to do that testing is not ready
to merge with libgit2, but I do plan to add more thorough tests.)

This contains a significant number of changes and also tweaks the
public API slightly to make emulating core git easier.

Most notably, this separates the GIT_DIFF_FIND_AND_BREAK_REWRITES
flag into FIND_REWRITES (which adds a self-similarity score to
every modified file) and BREAK_REWRITES (which splits the modified
deltas into add/remove pairs in the diff list).  When you do a raw
output of core git, rewrites show up as M090 or such, not at A and
D output, so I wanted to be able to emulate that.

Publicly, this also changes the flags to be uint16_t since we
don't need values out of that range.

Internally, this contains significant changes from a number of
small bug fixes (like using the wrong side of the diff to decide
if the object could be found in the ODB vs the workdir) to larger
issues about which files can and should be compared and how the
various edge cases of similarity scores should be treated.

Honestly, I don't think this is the last update that will have to
be made to this code, but I think this moves us closer to correct
behavior and I tried to document the code so it would be easier
to follow..
2013-05-17 17:21:45 -07:00
..
blob.c Initial integration of similarity metric to diff 2013-02-21 12:40:33 -08:00
diff_helpers.c Add GIT_DIFF_LINE_CONTEXT_EOFNL 2013-05-07 04:32:17 -07:00
diff_helpers.h More tests for diff untracked directories 2013-04-30 04:25:56 -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
notify.c Notify '*' pathspec correctly when diffing 2013-04-11 09:59:26 +02:00
patch.c Fix line numbering for patches with eofnl 2013-05-07 07:15:39 -07:00
rename.c Fix issues with git_diff_find_similar 2013-05-17 17:21:45 -07:00
submodules.c Tests and more fixes for submodule diffs 2013-04-09 14:52:32 -07:00
tree.c Improve diff config options handling 2013-04-23 12:57:30 -07:00
workdir.c Fix diff crash when last item is untracked dir 2013-05-15 14:50:05 -07:00