summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-07-15 10:28:34 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-07-15 10:28:34 -0700
commit9678ee7ba30a76b0b5c613126e659dcb1a206091 (patch)
tree84f70d381a8af68cad07a3242bfb2673623aadcf /t
parentMerge branch 'jk/fetch-pack-many-refs' (diff)
parentmerge: handle --ff/--no-ff/--ff-only as a tri-state option (diff)
downloadtgif-9678ee7ba30a76b0b5c613126e659dcb1a206091.tar.xz
Merge branch 'mv/merge-ff-tristate'
The configuration variable "merge.ff" was cleary a tri-state to choose one from "favor fast-forward when possible", "always create a merge even when the history could fast-forward" and "do not create any merge, only update when the history fast-forwards", but the command line parser did not implement the usual convention of "last one wins, and command line overrides the configuration" correctly. * mv/merge-ff-tristate: merge: handle --ff/--no-ff/--ff-only as a tri-state option
Diffstat (limited to 't')
-rwxr-xr-xt/t7600-merge.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 460d8ebf48..3ff5fb853c 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -497,9 +497,15 @@ test_expect_success 'combining --squash and --no-ff is refused' '
test_must_fail git merge --no-ff --squash c1
'
-test_expect_success 'combining --ff-only and --no-ff is refused' '
- test_must_fail git merge --ff-only --no-ff c1 &&
- test_must_fail git merge --no-ff --ff-only c1
+test_expect_success 'option --ff-only overwrites --no-ff' '
+ git merge --no-ff --ff-only c1 &&
+ test_must_fail git merge --no-ff --ff-only c2
+'
+
+test_expect_success 'option --ff-only overwrites merge.ff=only config' '
+ git reset --hard c0 &&
+ test_config merge.ff only &&
+ git merge --no-ff c1
'
test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '