summaryrefslogtreecommitdiff
path: root/t/t7600-merge.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-06 22:03:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-06 22:10:36 (GMT)
commit541d1fa85ca4741e8b6db281f3d788dcfc423bdc (patch)
tree4d8309a5e271cc0891fd4c6c10550e73625e658b /t/t7600-merge.sh
parentec014eac0e9e6f30cbbca616090fa2ecf74797e7 (diff)
parent0d8fc3efc65df74a2b39b3f9798861a1b2055b62 (diff)
downloadgit-541d1fa85ca4741e8b6db281f3d788dcfc423bdc.zip
git-541d1fa85ca4741e8b6db281f3d788dcfc423bdc.tar.gz
git-541d1fa85ca4741e8b6db281f3d788dcfc423bdc.tar.bz2
Merge branch 'jc/maint-branch-mergeoptions' into mg/merge-ff-config
* jc/maint-branch-mergeoptions: merge: make branch.<name>.mergeoptions correctly override merge.<option>
Diffstat (limited to 't/t7600-merge.sh')
-rwxr-xr-xt/t7600-merge.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 87d5d78..46b61ec 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -324,6 +324,39 @@ test_expect_success 'merge c1 with c2 (no-commit in config)' '
test_debug 'git log --graph --decorate --oneline --all'
+test_expect_success 'merge c1 with c2 (log in config)' '
+ git config branch.master.mergeoptions "" &&
+ git reset --hard c1 &&
+ git merge --log c2 &&
+ git show -s --pretty=tformat:%s%n%b >expect &&
+
+ git config branch.master.mergeoptions --log &&
+ git reset --hard c1 &&
+ git merge c2 &&
+ git show -s --pretty=tformat:%s%n%b >actual &&
+
+ test_cmp expect actual
+'
+
+test_expect_success 'merge c1 with c2 (log in config gets overridden)' '
+ test_when_finished "git config --remove-section branch.master" &&
+ test_when_finished "git config --remove-section merge" &&
+ test_might_fail git config --remove-section branch.master &&
+ test_might_fail git config --remove-section merge &&
+
+ git reset --hard c1 &&
+ git merge c2 &&
+ git show -s --pretty=tformat:%s%n%b >expect &&
+
+ git config branch.master.mergeoptions "--no-log" &&
+ git config merge.log true &&
+ git reset --hard c1 &&
+ git merge c2 &&
+ git show -s --pretty=tformat:%s%n%b >actual &&
+
+ test_cmp expect actual
+'
+
test_expect_success 'merge c1 with c2 (squash in config)' '
git reset --hard c1 &&
git config branch.master.mergeoptions "--squash" &&