3 test_description
='merge-recursive: handle file mode'
6 if test "$(git config --bool core.filemode)" = false
; then
7 say
"executable bit not honored - skipping tests"
11 # Note that we follow "chmod +x F" with "update-index --chmod=+x F" to
12 # help filesystems that do not have the executable bit.
14 test_expect_success
'mode change in one branch: keep changed version' '
17 git commit -m initial &&
18 git checkout -b a1 master &&
22 git checkout -b b1 master &&
24 git update-index --chmod=+x file1 &&
27 git merge-recursive master -- a1 b1 &&
31 test_expect_success
'mode change in both branches: expect conflict' '
32 git reset --hard HEAD &&
33 git checkout -b a2 master &&
35 H=$(git hash-object file2) &&
37 git update-index --add --chmod=+x file2 &&
39 git checkout -b b2 master &&
45 git merge-recursive master -- a2 b2
48 git ls-files -u >actual &&
50 echo "100755 $H 2 file2"
51 echo "100644 $H 3 file2"
53 test_cmp actual expect &&