3 test_description='typechange rename detection'
7 if ! test_have_prereq SYMLINKS
9 skip_all='Symbolic links not supported, skipping tests.'
13 test_expect_success setup '
16 cat "$TEST_DIRECTORY"/../COPYING >foo &&
19 git commit -a -m Initial &&
23 cat "$TEST_DIRECTORY"/../COPYING >bar &&
26 git commit -a -m Second &&
30 cat "$TEST_DIRECTORY"/../COPYING >foo &&
32 git commit -a -m Third &&
38 git commit -a -m Fourth &&
41 # This is purely for sanity check
44 cat "$TEST_DIRECTORY"/../COPYING >foo &&
45 cat "$TEST_DIRECTORY"/../Makefile >bar &&
47 git commit -a -m Fifth &&
51 cat "$TEST_DIRECTORY"/../Makefile >foo &&
52 cat "$TEST_DIRECTORY"/../COPYING >bar &&
54 git commit -a -m Sixth &&
59 test_expect_success 'cross renames to be detected for regular files' '
61 git diff-tree five six -r --name-status -B -M | sort >actual &&
66 test_cmp expect actual
70 test_expect_success 'cross renames to be detected for typechange' '
72 git diff-tree one two -r --name-status -B -M | sort >actual &&
77 test_cmp expect actual
81 test_expect_success 'moves and renames' '
83 git diff-tree three four -r --name-status -B -M | sort >actual &&
88 test_cmp expect actual