summaryrefslogtreecommitdiff
path: root/t/t5553-set-upstream.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-07-22 05:04:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-22 18:54:29 (GMT)
commit031e2f7ae195069d00d21cde906fce5b0318dbdd (patch)
tree61c6b5cb09f65ab91fe17c72c7cdfc5d8213c5f0 /t/t5553-set-upstream.sh
parentadc27d6a9374d012b091bc348c20f5bfdbee52d1 (diff)
downloadgit-031e2f7ae195069d00d21cde906fce5b0318dbdd.zip
git-031e2f7ae195069d00d21cde906fce5b0318dbdd.tar.gz
git-031e2f7ae195069d00d21cde906fce5b0318dbdd.tar.bz2
pull: abort by default when fast-forwarding is not possible
We have for some time shown a long warning when the user does not specify how to reconcile divergent branches with git pull. Make it an error now. Initial-patch-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5553-set-upstream.sh')
-rwxr-xr-xt/t5553-set-upstream.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t5553-set-upstream.sh b/t/t5553-set-upstream.sh
index b1d614c..9c12c0f 100755
--- a/t/t5553-set-upstream.sh
+++ b/t/t5553-set-upstream.sh
@@ -108,27 +108,27 @@ test_expect_success 'setup commit on main and other pull' '
test_expect_success 'pull --set-upstream upstream main sets branch main but not other' '
clear_config main other &&
- git pull --set-upstream upstream main &&
+ git pull --no-rebase --set-upstream upstream main &&
check_config main upstream refs/heads/main &&
check_config_missing other
'
test_expect_success 'pull --set-upstream main:other2 does not set the branch other2' '
clear_config other2 &&
- git pull --set-upstream upstream main:other2 &&
+ git pull --no-rebase --set-upstream upstream main:other2 &&
check_config_missing other2
'
test_expect_success 'pull --set-upstream upstream other sets branch main' '
clear_config main other &&
- git pull --set-upstream upstream other &&
+ git pull --no-rebase --set-upstream upstream other &&
check_config main upstream refs/heads/other &&
check_config_missing other
'
test_expect_success 'pull --set-upstream upstream tag does not set the tag' '
clear_config three &&
- git pull --tags --set-upstream upstream three &&
+ git pull --no-rebase --tags --set-upstream upstream three &&
check_config_missing three
'
@@ -144,16 +144,16 @@ test_expect_success 'pull --set-upstream http://nosuchdomain.example.com fails w
test_expect_success 'pull --set-upstream upstream HEAD sets branch HEAD' '
clear_config main other &&
- git pull --set-upstream upstream HEAD &&
+ git pull --no-rebase --set-upstream upstream HEAD &&
check_config main upstream HEAD &&
git checkout other &&
- git pull --set-upstream upstream HEAD &&
+ git pull --no-rebase --set-upstream upstream HEAD &&
check_config other upstream HEAD
'
test_expect_success 'pull --set-upstream upstream with more than one branch does nothing' '
clear_config main three &&
- git pull --set-upstream upstream main three &&
+ git pull --no-rebase --set-upstream upstream main three &&
check_config_missing main &&
check_config_missing three
'