| test_description='typechange rename detection' |
| test_expect_success SYMLINKS setup ' |
| cat "$TEST_DIRECTORY"/../COPYING >foo && |
| git commit -a -m Initial && |
| cat "$TEST_DIRECTORY"/../COPYING >bar && |
| git commit -a -m Second && |
| cat "$TEST_DIRECTORY"/../COPYING >foo && |
| git commit -a -m Third && |
| git commit -a -m Fourth && |
| # This is purely for sanity check |
| cat "$TEST_DIRECTORY"/../COPYING >foo && |
| cat "$TEST_DIRECTORY"/../Makefile >bar && |
| git commit -a -m Fifth && |
| cat "$TEST_DIRECTORY"/../Makefile >foo && |
| cat "$TEST_DIRECTORY"/../COPYING >bar && |
| git commit -a -m Sixth && |
| test_expect_success SYMLINKS 'cross renames to be detected for regular files' ' |
| git diff-tree five six -r --name-status -B -M | sort >actual && |
| test_expect_success SYMLINKS 'cross renames to be detected for typechange' ' |
| git diff-tree one two -r --name-status -B -M | sort >actual && |
| test_expect_success SYMLINKS 'moves and renames' ' |
| git diff-tree three four -r --name-status -B -M | sort >actual && |