[PATCH] t7600: test merge configuration override
- From
Yann Droneaud <ydroneaud@opteya.com>
- Date
- Mar 22, 2013, 10:09 UTC
- Message-ID
- <1363946943-30269-1-git-send-email-ydroneaud@opteya.com>
- In-Reply-To
- <cdc4f45e7520ce1fc48588c260214717@meuh.org>
Set the configuration variable 'merge.ff' to either 'only' or 'no' and check that this configuration can be overridden on command line.
Additionally, test for currently not tested option '--no-ff-only'
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> --- t/t7600-merge.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 5e19598..b524bdb 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -254,6 +254,32 @@ test_expect_success 'merges with merge.ff=only' ' verify_head $c3 ' +test_expect_success 'merges with merge.ff=only and --no-ff-only' ' + git reset --hard c1 && + test_tick && + test_when_finished "git config --unset merge.ff" && + git config merge.ff only && + test_must_fail git merge --no-ff c2 && + git merge --no-ff-only c2 && + + git reset --hard c1 && + git merge --no-ff-only --no-ff c2 +' + +test_expect_success 'merges with merge.ff=no and --ff' ' + git reset --hard c0 && + test_tick && + test_when_finished "git config --unset merge.ff" && + git config merge.ff no && + test_must_fail git merge --ff-only c1 && + git merge --ff c1 && + verify_head $c1 && + + git reset --hard c0 && + git merge --ff --ff-only c1 && + verify_head $c1 +' + test_expect_success 'merge c0 with c1 (no-commit)' ' git reset --hard c0 && git merge --no-commit c1 &&
-- 1.7.11.7