summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-02-27 10:43:54 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-02-27 10:43:54 -0800
commitc1ab3b8a44149a8dfb8968a958b13ac9e8d9579a (patch)
treead13ad23ec4fdecbaaf7cb8a9c4e9729f2ec18cd /t
parentMerge branch 'nd/ita-wt-renames-in-status' into maint (diff)
parentcommit: add support for --fixup <commit> -m"<extra message>" (diff)
downloadtgif-c1ab3b8a44149a8dfb8968a958b13ac9e8d9579a.tar.xz
Merge branch 'ab/commit-m-with-fixup' into maint
"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-xt/t7500-commit.sh9
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
'