Start the 2.46 cycle
[alt-git.git] / t / t5518-fetch-exit-status.sh
blobc13120088fa684b59cc2f598d8ebfe05cae7b42c
1 #!/bin/sh
3 # Copyright (c) 2008 Dmitry V. Levin
6 test_description='fetch exit status test'
8 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
11 TEST_PASSES_SANITIZE_LEAK=true
12 . ./test-lib.sh
14 test_expect_success setup '
16 >file &&
17 git add file &&
18 git commit -m initial &&
20 git checkout -b side &&
21 echo side >file &&
22 git commit -a -m side &&
24 git checkout main &&
25 echo next >file &&
26 git commit -a -m next
29 test_expect_success 'non-fast-forward fetch' '
31 test_must_fail git fetch . main:side
35 test_expect_success 'forced update' '
37 git fetch . +main:side
41 test_done