Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/commit-C-pick-empty' into maint
author
Junio C Hamano
<gitster@pobox.com>
Wed, 25 Jun 2014 18:46:54 +0000
(11:46 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 25 Jun 2014 18:46:54 +0000
(11:46 -0700)
"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
1
2
builtin/commit.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
4d27d8c
076cbd6
)
diff --cc
builtin/commit.c
index 9cfef6c6cca61973a4982763e4b834bf1b45cb75,aa04507174765a230ff56626cffb5d0a7e66c4a7..65c069d2cbdd7f34b9ebf7add06e65de17df8efa
---
1
/
builtin/commit.c
---
2
/
builtin/commit.c
+++ b/
builtin/commit.c
@@@
-648,11
-649,9
+648,10
@@@
static int prepare_to_commit(const cha
logfile);
hook_arg1 = "message";
} 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) {