3 test_description
='typechange rename detection'
7 if test "$no_symlinks"; then
8 say
"symbolic links not supported - skipping test"
12 test_expect_success setup
'
15 cat "$TEST_DIRECTORY"/../COPYING >foo &&
18 git commit -a -m Initial &&
22 cat "$TEST_DIRECTORY"/../COPYING >bar &&
25 git commit -a -m Second &&
29 cat "$TEST_DIRECTORY"/../COPYING >foo &&
31 git commit -a -m Third &&
37 git commit -a -m Fourth &&
40 # This is purely for sanity check
43 cat "$TEST_DIRECTORY"/../COPYING >foo &&
44 cat "$TEST_DIRECTORY"/../Makefile >bar &&
46 git commit -a -m Fifth &&
50 cat "$TEST_DIRECTORY"/../Makefile >foo &&
51 cat "$TEST_DIRECTORY"/../COPYING >bar &&
53 git commit -a -m Sixth &&
58 test_expect_success
'cross renames to be detected for regular files' '
60 git diff-tree five six -r --name-status -B -M | sort >actual &&
65 test_cmp expect actual
69 test_expect_success
'cross renames to be detected for typechange' '
71 git diff-tree one two -r --name-status -B -M | sort >actual &&
76 test_cmp expect actual
80 test_expect_success
'moves and renames' '
82 git diff-tree three four -r --name-status -B -M | sort >actual &&
87 test_cmp expect actual