tvl-depot/third_party/git/t/t5518-fetch-exit-status.sh
Vincent Ambo 7ef0d62730 merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
2020-01-11 23:40:29 +00:00

37 lines
508 B
Bash
Executable file

#!/bin/sh
#
# Copyright (c) 2008 Dmitry V. Levin
#
test_description='fetch exit status test'
. ./test-lib.sh
test_expect_success setup '
>file &&
git add file &&
git commit -m initial &&
git checkout -b side &&
echo side >file &&
git commit -a -m side &&
git checkout master &&
echo next >file &&
git commit -a -m next
'
test_expect_success 'non-fast-forward fetch' '
test_must_fail git fetch . master:side
'
test_expect_success 'forced update' '
git fetch . +master:side
'
test_done