3 test_description
='read-tree -m -u checks working tree files'
9 test_expect_success
'two-way setup' '
11 echo >file1 file one &&
12 echo >file2 file two &&
13 git update-index --add file1 file2 &&
14 git commit -m initial &&
17 git tag -f branch-point &&
19 echo file2 is not tracked on the master anymore &&
21 git update-index --remove file2 &&
22 git commit -a -m "master removes file2"
25 test_expect_success
'two-way not clobbering' '
27 echo >file2 master creates untracked file2 &&
28 if err=`git read-tree -m -u master side 2>&1`
30 echo should have complained
33 echo "happy to see $err"
39 test_expect_success
'three-way not complaining' '
43 echo >file3 file three &&
44 git update-index --add file3 &&
45 git commit -a -m "side adds file3" &&
47 git checkout master &&
48 echo >file2 file two is untracked on the master side &&
50 git-read-tree -m -u branch-point master side