summaryrefslogtreecommitdiff
path: root/t/t7600-merge.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-06-17 17:15:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-17 17:15:17 (GMT)
commit6e0b1c60ad3e6067d5cae51a7dc36e58184accd5 (patch)
tree030db59bb6a9b059c1cc968e80bcc6fd7dfcabfe /t/t7600-merge.sh
parent3a54d80ac8a1decac6fa158175fb16f0563f5c15 (diff)
parent1d14d0c9949c02260fe4f8b3a54a1b5c605823a2 (diff)
downloadgit-6e0b1c60ad3e6067d5cae51a7dc36e58184accd5.zip
git-6e0b1c60ad3e6067d5cae51a7dc36e58184accd5.tar.gz
git-6e0b1c60ad3e6067d5cae51a7dc36e58184accd5.tar.bz2
Merge branch 'vv/merge-squash-with-explicit-commit'
"git merge --squash" is designed to update the working tree and the index without creating the commit, and this cannot be countermanded by adding the "--commit" option; the command now refuses to work when both options are given. * vv/merge-squash-with-explicit-commit: merge: refuse --commit with --squash
Diffstat (limited to 't/t7600-merge.sh')
-rwxr-xr-xt/t7600-merge.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 612ebe7..1326088 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -570,6 +570,12 @@ test_expect_success 'combining --squash and --no-ff is refused' '
test_must_fail git merge --no-ff --squash c1
'
+test_expect_success 'combining --squash and --commit is refused' '
+ git reset --hard c0 &&
+ test_must_fail git merge --squash --commit c1 &&
+ test_must_fail git merge --commit --squash c1
+'
+
test_expect_success 'option --ff-only overwrites --no-ff' '
git merge --no-ff --ff-only c1 &&
test_must_fail git merge --no-ff --ff-only c2