summaryrefslogtreecommitdiff
path: root/t/t7601-merge-pull-config.sh
diff options
context:
space:
mode:
authorLibravatar Alex Henrie <alexhenrie24@gmail.com>2021-07-21 01:42:19 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-20 21:43:12 -0700
commit3d5fc24daefbdf56bc36a491aed0b7990fa0c62f (patch)
treeef359b69c3e219588b10455b6fe7d89976df9f93 /t/t7601-merge-pull-config.sh
parentt7601: add tests of interactions with multiple merge heads and config (diff)
downloadtgif-3d5fc24daefbdf56bc36a491aed0b7990fa0c62f.tar.xz
pull: abort if --ff-only is given and fast-forwarding is impossible
The warning about pulling without specifying how to reconcile divergent branches says that after setting pull.rebase to true, --ff-only can still be passed on the command line to require a fast-forward. Make that actually work. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> [en: updated tests; note 3 fixes and 1 new failure] Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7601-merge-pull-config.sh')
-rwxr-xr-xt/t7601-merge-pull-config.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index 21db1e9e14..d1f621725a 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -209,11 +209,11 @@ test_attempts_fast_forward () {
# Group 1: Interaction of --ff-only with --[no-]rebase
# (And related interaction of pull.ff=only with pull.rebase)
#
-test_expect_failure '--ff-only overrides --rebase' '
+test_expect_success '--ff-only overrides --rebase' '
test_attempts_fast_forward pull --rebase --ff-only
'
-test_expect_failure '--ff-only overrides --rebase even if first' '
+test_expect_success '--ff-only overrides --rebase even if first' '
test_attempts_fast_forward pull --ff-only --rebase
'
@@ -221,7 +221,7 @@ test_expect_success '--ff-only overrides --no-rebase' '
test_attempts_fast_forward pull --ff-only --no-rebase
'
-test_expect_failure 'pull.ff=only overrides pull.rebase=true' '
+test_expect_success 'pull.ff=only overrides pull.rebase=true' '
test_attempts_fast_forward -c pull.ff=only -c pull.rebase=true pull
'
@@ -252,7 +252,7 @@ test_expect_success 'pull.rebase=true overrides pull.ff=true' '
'
# Group 3: command line flags take precedence over config
-test_expect_failure '--ff-only takes precedence over pull.rebase=true' '
+test_expect_success '--ff-only takes precedence over pull.rebase=true' '
test_attempts_fast_forward -c pull.rebase=true pull --ff-only
'
@@ -264,7 +264,7 @@ test_expect_failure '--no-rebase takes precedence over pull.ff=only' '
test_falls_back_to_full_merge -c pull.ff=only pull --no-rebase
'
-test_expect_success '--rebase takes precedence over pull.ff=only' '
+test_expect_failure '--rebase takes precedence over pull.ff=only' '
test_does_rebase -c pull.ff=only pull --rebase
'