Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-07-22 08:04:48 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-22 21:54:29 +0300
commit031e2f7ae195069d00d21cde906fce5b0318dbdd (patch)
tree61c6b5cb09f65ab91fe17c72c7cdfc5d8213c5f0 /t/t5520-pull.sh
parentadc27d6a9374d012b091bc348c20f5bfdbee52d1 (diff)
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/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index e2c0c51022..672001a18b 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -136,12 +136,12 @@ test_expect_success 'the default remote . should not break explicit pull' '
git reset --hard HEAD^ &&
echo file >expect &&
test_cmp expect file &&
- git pull . second &&
+ git pull --no-rebase . second &&
echo modified >expect &&
test_cmp expect file &&
git reflog -1 >reflog.actual &&
sed "s/^[0-9a-f][0-9a-f]*/OBJID/" reflog.actual >reflog.fuzzy &&
- echo "OBJID HEAD@{0}: pull . second: Fast-forward" >reflog.expected &&
+ echo "OBJID HEAD@{0}: pull --no-rebase . second: Fast-forward" >reflog.expected &&
test_cmp reflog.expected reflog.fuzzy
'
@@ -226,7 +226,7 @@ test_expect_success 'fail if the index has unresolved entries' '
test_commit modified2 file &&
git ls-files -u >unmerged &&
test_must_be_empty unmerged &&
- test_must_fail git pull . second &&
+ test_must_fail git pull --no-rebase . second &&
git ls-files -u >unmerged &&
test_file_not_empty unmerged &&
cp file expected &&
@@ -409,37 +409,37 @@ test_expect_success 'pull --rebase --no-autostash & rebase.autostash unset' '
test_expect_success 'pull succeeds with dirty working directory and merge.autostash set' '
test_config merge.autostash true &&
- test_pull_autostash 2
+ test_pull_autostash 2 --no-rebase
'
test_expect_success 'pull --autostash & merge.autostash=true' '
test_config merge.autostash true &&
- test_pull_autostash 2 --autostash
+ test_pull_autostash 2 --autostash --no-rebase
'
test_expect_success 'pull --autostash & merge.autostash=false' '
test_config merge.autostash false &&
- test_pull_autostash 2 --autostash
+ test_pull_autostash 2 --autostash --no-rebase
'
test_expect_success 'pull --autostash & merge.autostash unset' '
test_unconfig merge.autostash &&
- test_pull_autostash 2 --autostash
+ test_pull_autostash 2 --autostash --no-rebase
'
test_expect_success 'pull --no-autostash & merge.autostash=true' '
test_config merge.autostash true &&
- test_pull_autostash_fail --no-autostash
+ test_pull_autostash_fail --no-autostash --no-rebase
'
test_expect_success 'pull --no-autostash & merge.autostash=false' '
test_config merge.autostash false &&
- test_pull_autostash_fail --no-autostash
+ test_pull_autostash_fail --no-autostash --no-rebase
'
test_expect_success 'pull --no-autostash & merge.autostash unset' '
test_unconfig merge.autostash &&
- test_pull_autostash_fail --no-autostash
+ test_pull_autostash_fail --no-autostash --no-rebase
'
test_expect_success 'pull.rebase' '