]> git.ipfire.org Git - thirdparty/git.git/blame - t/t5518-fetch-exit-status.sh
Sync with Git 2.45.1
[thirdparty/git.git] / t / t5518-fetch-exit-status.sh
CommitLineData
efb98b44
DL
1#!/bin/sh
2#
3# Copyright (c) 2008 Dmitry V. Levin
4#
5
6test_description='fetch exit status test'
7
bc925ce3 8GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
334afbc7
JS
9export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10
7a98d9ab 11TEST_PASSES_SANITIZE_LEAK=true
efb98b44
DL
12. ./test-lib.sh
13
14test_expect_success setup '
15
16 >file &&
17 git add file &&
18 git commit -m initial &&
19
20 git checkout -b side &&
21 echo side >file &&
22 git commit -a -m side &&
23
bc925ce3 24 git checkout main &&
efb98b44
DL
25 echo next >file &&
26 git commit -a -m next
27'
28
a75d7b54 29test_expect_success 'non-fast-forward fetch' '
efb98b44 30
bc925ce3 31 test_must_fail git fetch . main:side
efb98b44
DL
32
33'
34
35test_expect_success 'forced update' '
36
bc925ce3 37 git fetch . +main:side
efb98b44
DL
38
39'
40
41test_done