Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-06 22:16:04 +0400
committerJunio C Hamano <gitster@pobox.com>2014-06-06 22:16:04 +0400
commite88155d1e1c3b55ed1f78425b0c2e5a09eea29dd (patch)
treecc354c22f25f0576ce5a02f63bcea021fbe208b4 /builtin
parent561d952ed412889da454d852f027fd985d532c44 (diff)
parent076cbd6341182d296671cb101c75145eb3bfda0a (diff)
Merge branch 'jk/commit-C-pick-empty'
"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 'builtin')
-rw-r--r--builtin/commit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index caec5c0e18..0320efd57d 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -676,9 +676,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
} else if (use_message) {
char *buffer;
buffer = strstr(use_message_buffer, "\n\n");
- if (!use_editor && (!buffer || buffer[2] == '\0'))
- die(_("commit has empty message"));
- strbuf_add(&sb, buffer + 2, strlen(buffer + 2));
+ if (buffer)
+ strbuf_add(&sb, buffer + 2, strlen(buffer + 2));
hook_arg1 = "commit";
hook_arg2 = use_message;
} else if (fixup_message) {