projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'jc/diff' into next
[git.git]
/
commit.c
diff --git
a/commit.c
b/commit.c
index
af747bd
..
42b44bb
100644
(file)
--- 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));
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));
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)
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 (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) {
}
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);
}
memset(buf + offset, ' ', indent);
memcpy(buf + offset + indent, line, linelen);