3 test_description='merge-recursive: handle file mode'
6 # Note that we follow "chmod +x F" with "update-index --chmod=+x F" to
7 # help filesystems that do not have the executable bit.
9 test_expect_success 'mode change in one branch: keep changed version' '
12 git commit -m initial &&
13 git checkout -b a1 master &&
17 git checkout -b b1 master &&
19 git update-index --chmod=+x file1 &&
22 git merge-recursive master -- a1 b1 &&
26 test_expect_success 'mode change in both branches: expect conflict' '
27 git reset --hard HEAD &&
28 git checkout -b a2 master &&
30 H=$(git hash-object file2) &&
32 git update-index --add --chmod=+x file2 &&
34 git checkout -b b2 master &&
40 git merge-recursive master -- a2 b2
43 git ls-files -u >actual &&
45 echo "100755 $H 2 file2"
46 echo "100644 $H 3 file2"
48 test_cmp actual expect &&