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-25 22:46:54 +0400
committerJunio C Hamano <gitster@pobox.com>2014-06-25 22:46:54 +0400
commitb659f8108562f931fcd0ecf900dd4da9ff831ce8 (patch)
tree5dfe7d3327f282b0fd040f4835f86272e4b9ee23 /builtin
parent4d27d8cbc4ac74fee7b64ca9182ad920b958655f (diff)
parent076cbd6341182d296671cb101c75145eb3bfda0a (diff)
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 '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 9cfef6c6cc..65c069d2cb 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -650,9 +650,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) {