3 test_description='typechange rename detection'
7 test_expect_success setup '
10 cat "$TEST_DIRECTORY"/../COPYING >foo &&
13 git commit -a -m Initial &&
17 cat "$TEST_DIRECTORY"/../COPYING >bar &&
20 git commit -a -m Second &&
24 cat "$TEST_DIRECTORY"/../COPYING >foo &&
26 git commit -a -m Third &&
32 git commit -a -m Fourth &&
35 # This is purely for sanity check
38 cat "$TEST_DIRECTORY"/../COPYING >foo &&
39 cat "$TEST_DIRECTORY"/../Makefile >bar &&
41 git commit -a -m Fifth &&
45 cat "$TEST_DIRECTORY"/../Makefile >foo &&
46 cat "$TEST_DIRECTORY"/../COPYING >bar &&
48 git commit -a -m Sixth &&
53 test_expect_success 'cross renames to be detected for regular files' '
55 git diff-tree five six -r --name-status -B -M | sort >actual &&
60 test_cmp expect actual
64 test_expect_success 'cross renames to be detected for typechange' '
66 git diff-tree one two -r --name-status -B -M | sort >actual &&
71 test_cmp expect actual
75 test_expect_success 'moves and renames' '
77 git diff-tree three four -r --name-status -B -M | sort >actual &&
82 test_cmp expect actual