shortlog: fix segfault on empty authorname
[git/dscho.git] / t / t1004-read-tree-m-u-wf.sh
blob018fbea450b3481bea2586769de7418dea929e29
1 #!/bin/sh
3 test_description='read-tree -m -u checks working tree files'
5 . ./test-lib.sh
7 # two-tree test
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 &&
16 git branch side &&
17 git tag -f branch-point &&
19 echo file2 is not tracked on the master anymore &&
20 rm -f file2 &&
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`
29 then
30 echo should have complained
31 false
32 else
33 echo "happy to see $err"
37 # three-tree test
39 test_expect_success 'three-way not complaining' '
41 rm -f file2 &&
42 git checkout side &&
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
53 test_done