1 #!/bin/sh
2 #
3 # Copyright (c) 2008 Dmitry V. Levin
4 #
6 test_description='fetch exit status test'
8 . ./test-lib.sh
10 test_expect_success setup '
12 >file &&
13 git add file &&
14 git commit -m initial &&
16 git checkout -b side &&
17 echo side >file &&
18 git commit -a -m side &&
20 git checkout master &&
21 echo next >file &&
22 git commit -a -m next
23 '
25 test_expect_success 'non-fast-forward fetch' '
27 test_must_fail git fetch . master:side
29 '
31 test_expect_success 'forced update' '
33 git fetch . +master:side
35 '
37 test_done