Code

Merge branch 'maint-1.5.4' into maint
[git.git] / t / t3201-branch-contains.sh
1 #!/bin/sh
3 test_description='branch --contains <commit>'
5 . ./test-lib.sh
7 test_expect_success setup '
9         >file &&
10         git add file &&
11         test_tick &&
12         git commit -m initial &&
13         git branch side &&
15         echo 1 >file &&
16         test_tick &&
17         git commit -a -m "second on master" &&
19         git checkout side &&
20         echo 1 >file &&
21         test_tick &&
22         git commit -a -m "second on side" &&
24         git merge master
26 '
28 test_expect_success 'branch --contains=master' '
30         git branch --contains=master >actual &&
31         {
32                 echo "  master" && echo "* side"
33         } >expect &&
34         test_cmp expect actual
36 '
38 test_expect_success 'branch --contains master' '
40         git branch --contains master >actual &&
41         {
42                 echo "  master" && echo "* side"
43         } >expect &&
44         test_cmp expect actual
46 '
48 test_expect_success 'branch --contains=side' '
50         git branch --contains=side >actual &&
51         {
52                 echo "* side"
53         } >expect &&
54         test_cmp expect actual
56 '
58 test_done