Merge branch 'jc/commit-s-subject-is-not-a-footer'
* jc/commit-s-subject-is-not-a-footer: builtin-commit.c: fix logic to omit empty line before existing footers
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user