const char *subject = NULL;
if (fmt == CMIT_FMT_EMAIL)
- subject = "Subject: ";
+ subject = "Subject: [PATCH] ";
if (fmt == CMIT_FMT_ONELINE || fmt == CMIT_FMT_EMAIL)
indent = 0;
}
if (subject) {
- memcpy(buf + offset, subject, 9);
- offset += 9;
+ int slen = strlen(subject);
+ memcpy(buf + offset, subject, slen);
+ offset += slen;
}
memset(buf + offset, ' ', indent);
memcpy(buf + offset + indent, line, linelen);