diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-16 16:37:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-16 16:37:07 -0700 |
commit | 2f0db1d86bb89a30c6742b03c40b320c178b1097 (patch) | |
tree | c79e8aca5aebc9b4384463492a4e7c0ff9050912 /t | |
parent | c69e8b693591bc35e8f9421eacb9d59c71807304 (diff) | |
parent | 0d8fc3efc65df74a2b39b3f9798861a1b2055b62 (diff) | |
download | git-2f0db1d86bb89a30c6742b03c40b320c178b1097.tar.gz git-2f0db1d86bb89a30c6742b03c40b320c178b1097.tar.xz |
Merge branch 'jc/maint-branch-mergeoptions' into maint
* jc/maint-branch-mergeoptions:
merge: make branch.<name>.mergeoptions correctly override merge.<option>
Conflicts:
builtin/merge.c
Diffstat (limited to 't')
-rwxr-xr-x | t/t7600-merge.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 87d5d788c..5463f87e6 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -324,6 +324,38 @@ 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)' ' + ( + git config --remove-section branch.master + 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" && |