Originally-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx> --- builtin-commit.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin-commit.c b/builtin-commit.c index 3127247..1356d20 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -441,7 +441,7 @@ static int message_is_empty(struct strbuf *sb, int start) /* See if the template is just a prefix of the message. */ strbuf_init(&tmpl, 0); if (template_file && strbuf_read_file(&tmpl, template_file, 0) > 0) { - stripspace(&tmpl, 1); + stripspace(&tmpl, !no_edit); if (start + tmpl.len <= sb->len && memcmp(tmpl.buf, sb->buf + start, tmpl.len) == 0) start += tmpl.len; @@ -821,7 +821,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) strbuf_setlen(&sb, p - sb.buf + 1); if (!verbatim_message) - stripspace(&sb, 1); + stripspace(&sb, !no_edit); if (sb.len < header_len || message_is_empty(&sb, header_len)) { rollback_index_files(); die("no commit message? aborting commit."); -- 1.5.4.rc1.33.gbd32b - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html