diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-01-24 00:16:38 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-24 00:16:38 +0300 |
commit | 5550449812e26d97d4a70251c5027b1015351c91 (patch) | |
tree | b7c31e21a8dc41fae75388fc972d2643fe17b798 /t | |
parent | 86d7fcc40acc077638d51d2bf5133d5a66c5d959 (diff) | |
parent | 30884c9afcd03aa7d9a0524fde3c96d2e29cf9a9 (diff) |
Merge branch 'ab/commit-m-with-fixup'
"git commit --fixup" did not allow "-m<message>" option to be used
at the same time; allow it to annotate resulting commit with more
text.
* ab/commit-m-with-fixup:
commit: add support for --fixup <commit> -m"<extra message>"
commit doc: document that -c, -C, -F and --fixup with -m error
Diffstat (limited to 't')
-rwxr-xr-x | t/t7500-commit.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh index 1d33c5feb3..170b4810e0 100755 --- a/t/t7500-commit.sh +++ b/t/t7500-commit.sh @@ -272,6 +272,14 @@ test_expect_success 'commit --fixup provides correct one-line commit message' ' commit_msg_is "fixup! target message subject line" ' +test_expect_success 'commit --fixup -m"something" -m"extra"' ' + commit_for_rebase_autosquash_setup && + git commit --fixup HEAD~1 -m"something" -m"extra" && + commit_msg_is "fixup! target message subject linesomething + +extra" +' + test_expect_success 'commit --squash works with -F' ' commit_for_rebase_autosquash_setup && echo "log message from file" >msgfile && @@ -325,7 +333,6 @@ test_expect_success 'invalid message options when using --fixup' ' test_must_fail git commit --fixup HEAD~1 --squash HEAD~2 && test_must_fail git commit --fixup HEAD~1 -C HEAD~2 && test_must_fail git commit --fixup HEAD~1 -c HEAD~2 && - test_must_fail git commit --fixup HEAD~1 -m "cmdline message" && test_must_fail git commit --fixup HEAD~1 -F log ' |