remove logical typo in documentation of sample update hook
[git/spearce.git] / t / t6020-merge-df.sh
blobe71c687f2b9473842684fae1a1b4b013c721497f
1 #!/bin/sh
3 # Copyright (c) 2005 Fredrik Kuivinen
6 test_description='Test merge with directory/file conflicts'
7 . ./test-lib.sh
9 test_expect_success 'prepare repository' \
10 'echo "Hello" > init &&
11 git add init &&
12 git commit -m "Initial commit" &&
13 git branch B &&
14 mkdir dir &&
15 echo "foo" > dir/foo &&
16 git add dir/foo &&
17 git commit -m "File: dir/foo" &&
18 git checkout B &&
19 echo "file dir" > dir &&
20 git add dir &&
21 git commit -m "File: dir"'
23 test_expect_code 1 'Merge with d/f conflicts' 'git merge "merge msg" B master'
25 test_expect_failure 'F/D conflict' '
26 git reset --hard &&
27 git checkout master &&
28 rm .git/index &&
30 mkdir before &&
31 echo FILE >before/one &&
32 echo FILE >after &&
33 git add . &&
34 git commit -m first &&
36 rm -f after &&
37 git mv before after &&
38 git commit -m move &&
40 git checkout -b para HEAD^ &&
41 echo COMPLETELY ANOTHER FILE >another &&
42 git add . &&
43 git commit -m para &&
45 git merge master
48 test_done