Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
apply: apply works outside a repository
[gitweb.git]
/
builtin-commit.c
diff --git
a/builtin-commit.c
b/builtin-commit.c
index beddf01dd37e6644db7eb33b1b3aea2a74272783..d525b894ec1211476707acb06bdebe25d5828dbb 100644
(file)
--- a/
builtin-commit.c
+++ b/
builtin-commit.c
@@
-530,7
+530,7
@@
static int prepare_to_commit(const char *index_file, const char *prefix,
for (i = sb.len - 1; i > 0 && sb.buf[i - 1] != '\n'; i--)
; /* do nothing */
if (prefixcmp(sb.buf + i, sob.buf)) {
- if (!ends_rfc2822_footer(&sb))
+ if (!
i || !
ends_rfc2822_footer(&sb))
strbuf_addch(&sb, '\n');
strbuf_addbuf(&sb, &sob);
}