interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / t5518-fetch-exit-status.sh

40 lines · 589 bytes Raw Blame History
1#!/bin/sh
2#
3# Copyright (c) 2008 Dmitry V. Levin
4#
5
6test_description='fetch exit status test'
7
8GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
9export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10
11. ./test-lib.sh
12
13test_expect_success setup '
14
15 >file &&
16 git add file &&
17 git commit -m initial &&
18
19 git checkout -b side &&
20 echo side >file &&
21 git commit -a -m side &&
22
23 git checkout main &&
24 echo next >file &&
25 git commit -a -m next
26'
27
28test_expect_success 'non-fast-forward fetch' '
29
30 test_must_fail git fetch . main:side
31
32'
33
34test_expect_success 'forced update' '
35
36 git fetch . +main:side
37
38'
39
40test_done