3 # Copyright (c) 2007 Johannes Sixt
6 test_description='merging symlinks on filesystem w/o symlink support.
8 This tests that git merge-recursive writes merge results as plain files
9 if core.symlinks is false.'
15 git config core.symlinks false &&
18 git commit -m initial &&
19 git branch b-symlink &&
21 l=$(echo -n file | git hash-object -t blob -w --stdin) &&
22 echo "120000 $l symlink" | git update-index --index-info &&
23 git commit -m master &&
24 git checkout b-symlink &&
25 l=$(echo -n file-different | git hash-object -t blob -w --stdin) &&
26 echo "120000 $l symlink" | git update-index --index-info &&
27 git commit -m b-symlink &&
28 git checkout b-file &&
29 echo plain-file > symlink &&
34 'merge master into b-symlink, which has a different symbolic link' '
35 git checkout b-symlink &&
36 test_must_fail git merge master'
39 'the merge result must be a file' '
43 'merge master into b-file, which has a file instead of a symbolic link' '
44 git reset --hard && git checkout b-file &&
45 test_must_fail git merge master'
48 'the merge result must be a file' '
52 'merge b-file, which has a file instead of a symbolic link, into master' '
54 git checkout master &&
55 test_must_fail git merge b-file'
58 'the merge result must be a file' '