3 test_description
='test auto-generated merge messages'
7 echo "$1" |
sed "s/Q/'/g" >expect
&&
8 git log
-1 --pretty=tformat
:%s
>actual
&&
12 test_expect_success
'merge local branch' '
13 test_commit master-1 &&
14 git checkout -b local-branch &&
15 test_commit branch-1 &&
16 git checkout master &&
17 test_commit master-2 &&
18 git merge local-branch &&
19 check_oneline "Merge branch Qlocal-branchQ"
22 test_expect_success
'merge octopus branches' '
23 git checkout -b octopus-a master &&
24 test_commit octopus-1 &&
25 git checkout -b octopus-b master &&
26 test_commit octopus-2 &&
27 git checkout master &&
28 git merge octopus-a octopus-b &&
29 check_oneline "Merge branches Qoctopus-aQ and Qoctopus-bQ"
32 test_expect_success
'merge tag' '
33 git checkout -b tag-branch master &&
35 git checkout master &&
36 test_commit master-3 &&
38 check_oneline "Merge tag Qtag-1Q"
41 test_expect_success
'ambiguous tag' '
42 git checkout -b ambiguous master &&
43 test_commit ambiguous &&
44 git checkout master &&
45 test_commit master-4 &&
46 git merge ambiguous &&
47 check_oneline "Merge tag QambiguousQ"
50 test_expect_success
'remote-tracking branch' '
51 git checkout -b remote master &&
52 test_commit remote-1 &&
53 git update-ref refs/remotes/origin/master remote &&
54 git checkout master &&
55 test_commit master-5 &&
56 git merge origin/master &&
57 check_oneline "Merge remote-tracking branch Qorigin/masterQ"