]> git.proxmox.com Git - libgit2.git/commit - src/diff_tform.c
More git_diff_find_similar improvements
authorRussell Belfer <rb@github.com>
Mon, 20 May 2013 20:37:21 +0000 (13:37 -0700)
committerRussell Belfer <rb@github.com>
Mon, 20 May 2013 20:37:21 +0000 (13:37 -0700)
commit9be5be47fb1d9bc08e25b30c05dbf48739710062
tree7543170535a1260f24c27696c361e58ae19de17c
parent5c8f37a397609eba92c6a906be467a7d7373e4f3
More git_diff_find_similar improvements

- Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity
  matching without using the similarity metric (i.e. only compare
  the SHA).
- Clean up the similarity measurement code to more rigorously
  distinguish between files that are not similar and files that
  are not comparable (previously, a 0 could either mean that the
  files could not be compared or that they were totally different)
- When splitting a MODIFIED file into a DELETE/ADD pair, actually
  make a DELETED/UNTRACKED pair if the right side of the diff is
  from the working directory.  This prevents an odd mix of ADDED
  and UNTRACKED files on workdir diffs.
include/git2/diff.h
src/diff_tform.c
src/fileops.h