X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=commit.c;h=42b44bba52b3bcf8545f7e7753d5ebb755155163;hb=200f5dffc257f99f99597d1a8127e1d79ff3c176;hp=af747bde61d8330716e77a4a6db2839d9f8b59c5;hpb=7de4473f6a553f65840e9261c0fd4965298e1d16;p=git.git diff --git a/commit.c b/commit.c index af747bde..42b44bba 100644 --- a/commit.c +++ b/commit.c @@ -442,7 +442,8 @@ static int add_user_info(const char *what, enum cmit_fmt fmt, char *buf, const c ret += sprintf(buf + ret, "Date: %s\n", show_date(time, tz)); break; case CMIT_FMT_EMAIL: - ret += sprintf(buf + ret, "Date: %s\n", show_date(time, tz)); + ret += sprintf(buf + ret, "Date: %s\n", + show_rfc2822_date(time, tz)); break; case CMIT_FMT_FULLER: ret += sprintf(buf + ret, "%sDate: %s\n", what, show_date(time, tz)); @@ -498,7 +499,7 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit 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; @@ -574,8 +575,9 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit } 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);