[PATCH] t7600: test merge configuration override

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]