Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/commit-C-pick-empty'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Jun 2014 18:16:04 +0000
(11:16 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Jun 2014 18:16:04 +0000
(11:16 -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:
561d952
076cbd6
)
diff --cc
builtin/commit.c
index caec5c0e186f0b2870fc9066f34425cec06283a9,aa04507174765a230ff56626cffb5d0a7e66c4a7..0320efd57d51d3bf78bedd958b895e5a44fca640
---
1
/
builtin/commit.c
---
2
/
builtin/commit.c
+++ b/
builtin/commit.c
@@@
-674,11
-649,9
+674,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) {