3 test_description
='merge-recursive: handle file mode'
6 test_expect_success
'mode change in one branch: keep changed version' '
9 git commit -m initial &&
10 git checkout -b a1 master &&
14 git checkout -b b1 master &&
15 test_chmod +x file1 &&
18 git merge-recursive master -- a1 b1 &&
22 test_expect_success
'mode change in both branches: expect conflict' '
23 git reset --hard HEAD &&
24 git checkout -b a2 master &&
26 H=$(git hash-object file2) &&
27 test_chmod +x file2 &&
29 git checkout -b b2 master &&
35 git merge-recursive master -- a2 b2
38 git ls-files -u >actual &&
40 echo "100755 $H 2 file2"
41 echo "100644 $H 3 file2"
43 test_cmp actual expect &&