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