summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-25 18:46:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-25 18:46:54 (GMT)
commitb659f8108562f931fcd0ecf900dd4da9ff831ce8 (patch)
tree5dfe7d3327f282b0fd040f4835f86272e4b9ee23 /t
parent4d27d8cbc4ac74fee7b64ca9182ad920b958655f (diff)
parent076cbd6341182d296671cb101c75145eb3bfda0a (diff)
downloadgit-b659f8108562f931fcd0ecf900dd4da9ff831ce8.zip
git-b659f8108562f931fcd0ecf900dd4da9ff831ce8.tar.gz
git-b659f8108562f931fcd0ecf900dd4da9ff831ce8.tar.bz2
Merge branch 'jk/commit-C-pick-empty' into maint
"git commit --allow-empty-message -C $commit" did not work when the commit did not have any log message. * jk/commit-C-pick-empty: commit: do not complain of empty messages from -C
Diffstat (limited to 't')
-rwxr-xr-xt/t7500-commit.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index bdc1f29..116885a 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -223,7 +223,8 @@ test_expect_success 'Commit without message is allowed with --allow-empty-messag
git add foo &&
>empty &&
git commit --allow-empty-message <empty &&
- commit_msg_is ""
+ commit_msg_is "" &&
+ git tag empty-message-commit
'
test_expect_success 'Commit without message is no-no without --allow-empty-message' '
@@ -240,6 +241,14 @@ test_expect_success 'Commit a message with --allow-empty-message' '
commit_msg_is "hello there"
'
+test_expect_success 'commit -C empty respects --allow-empty-message' '
+ echo more >>foo &&
+ git add foo &&
+ test_must_fail git commit -C empty-message-commit &&
+ git commit -C empty-message-commit --allow-empty-message &&
+ commit_msg_is ""
+'
+
commit_for_rebase_autosquash_setup () {
echo "first content line" >>foo &&
git add foo &&