rebase: use correct base for --keep-base when a branch is given
[alt-git.git] / t / t5518-fetch-exit-status.sh
blob5c4ac2556e7820f41285b5f653a5f61cc5f75846
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-lib.sh
13 test_expect_success setup '
15 >file &&
16 git add file &&
17 git commit -m initial &&
19 git checkout -b side &&
20 echo side >file &&
21 git commit -a -m side &&
23 git checkout main &&
24 echo next >file &&
25 git commit -a -m next
28 test_expect_success 'non-fast-forward fetch' '
30 test_must_fail git fetch . main:side
34 test_expect_success 'forced update' '
36 git fetch . +main:side
40 test_done