]> git.proxmox.com Git - libgit2.git/commit - src/status.c
More tests and bug fixes for status with rename
authorRussell Belfer <rb@github.com>
Fri, 14 Jun 2013 23:18:04 +0000 (16:18 -0700)
committerRussell Belfer <rb@github.com>
Mon, 17 Jun 2013 17:03:49 +0000 (10:03 -0700)
commita1683f28ce2709e615490939e4e244046654d0e5
tree8eae4e60603cac390a5da9a3cbb745ea0e4b2644
parentfb03a223189f418d0767d7d04ff7509dfcfe8394
More tests and bug fixes for status with rename

This changes the behavior of the status RENAMED flags so that they
will be combined with the MODIFIED flags if appropriate.  If a file
is modified in the index and also renamed, then the status code
will have both the GIT_STATUS_INDEX_MODIFIED and INDEX_RENAMED bits
set.  If it is renamed but the OID has not changed, then just the
GIT_STATUS_INDEX_RENAMED bit will be set.  Similarly, the flags
GIT_STATUS_WT_MODIFIED and GIT_STATUS_WT_RENAMED can both be set
independently of one another.

This fixes a serious bug where the check for unmodified files that
was done at data load time could end up erasing the RENAMED state
of a file that was renamed with no changes.

Lastly, this contains a bunch of new tests for status with renames,
including tests where the only rename changes are case changes.
The expected results of these tests have to vary by whether the
platform uses a case sensitive filesystem or not, so the expected
data covers those platform differences separately.
src/diff.h
src/diff_patch.c
src/diff_print.c
src/diff_tform.c
src/status.c
tests-clar/status/renames.c