]>
git.ipfire.org Git - thirdparty/git.git/blob - t/t4130-apply-criss-cross-rename.sh
3 test_description
='git apply handling criss-cross rename patch.'
8 while test $cnt -le 100
15 test_expect_success
'setup' '
16 # Ensure that file sizes are different, because on Windows
17 # lstat() does not discover inode numbers, and we need
18 # other properties to discover swapped files
19 # (mtime is not always different, either).
20 create_file file1 "some content" &&
21 create_file file2 "some other content" &&
22 create_file file3 "again something else" &&
23 git add file1 file2 file3 &&
27 test_expect_success
'criss-cross rename' '
31 cp file1 file1-swapped &&
32 cp file2 file2-swapped
35 test_expect_success
'diff -M -B' '
36 git diff -M -B > diff &&
41 test_expect_success
'apply' '
43 test_cmp file1 file1-swapped &&
44 test_cmp file2 file2-swapped
47 test_expect_success
'criss-cross rename' '
53 cp file1 file1-swapped &&
54 cp file2 file2-swapped &&
55 cp file3 file3-swapped
58 test_expect_success
'diff -M -B' '
59 git diff -M -B > diff &&
63 test_expect_success
'apply' '
65 test_cmp file1 file1-swapped &&
66 test_cmp file2 file2-swapped &&
67 test_cmp file3 file3-swapped