Code

Merge branch 'lt/rev-list-gitlink'
[git.git] / t / t7600-merge.sh
index 110974cd01ad0fa613eb50555af6e547dabb1f49..6424c6e2c0b27f6d4dd19e9088710db932d2ace9 100755 (executable)
@@ -395,4 +395,46 @@ test_expect_success 'override config option --summary' '
 
 test_debug 'gitk --all'
 
+test_expect_success 'merge c1 with c2 (override --no-commit)' '
+       git reset --hard c1 &&
+       git config branch.master.mergeoptions "--no-commit" &&
+       test_tick &&
+       git merge --commit c2 &&
+       verify_merge file result.1-5 msg.1-5 &&
+       verify_parents $c1 $c2
+'
+
+test_debug 'gitk --all'
+
+test_expect_success 'merge c1 with c2 (override --squash)' '
+       git reset --hard c1 &&
+       git config branch.master.mergeoptions "--squash" &&
+       test_tick &&
+       git merge --no-squash c2 &&
+       verify_merge file result.1-5 msg.1-5 &&
+       verify_parents $c1 $c2
+'
+
+test_debug 'gitk --all'
+
+test_expect_success 'merge c0 with c1 (no-ff)' '
+       git reset --hard c0 &&
+       test_tick &&
+       git merge --no-ff c1 &&
+       verify_merge file result.1 &&
+       verify_parents $c0 $c1
+'
+
+test_debug 'gitk --all'
+
+test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '
+       git reset --hard c0 &&
+       git config branch.master.mergeoptions "--no-ff" &&
+       git merge --ff c1 &&
+       verify_merge file result.1 &&
+       verify_head $c1
+'
+
+test_debug 'gitk --all'
+
 test_done