projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] git-format-patch-script and mailinfo updates.
[git.git]
/
tools
/
mailinfo.c
diff --git
a/tools/mailinfo.c
b/tools/mailinfo.c
index
ae279bf
..
4dcc099
100644
(file)
--- a/
tools/mailinfo.c
+++ b/
tools/mailinfo.c
@@
-220,8
+220,9
@@
static int eatspace(char *line)
static void handle_body(void)
{
int has_from = 0;
static void handle_body(void)
{
int has_from = 0;
+ int has_date = 0;
- /* First line
of body can be a From
: */
+ /* First line
s of body can have From: and Date
: */
while (fgets(line, sizeof(line), stdin) != NULL) {
int len = eatspace(line);
if (!len)
while (fgets(line, sizeof(line), stdin) != NULL) {
int len = eatspace(line);
if (!len)
@@
-232,6
+233,13
@@
static void handle_body(void)
continue;
}
}
continue;
}
}
+ if (!memcmp("Date:", line, 5) && isspace(line[5])) {
+ if (!has_date) {
+ handle_date(line+6);
+ has_date = 1;
+ continue;
+ }
+ }
line[len] = '\n';
handle_rest();
break;
line[len] = '\n';
handle_rest();
break;