{"thread":{"id":"23479","subject":"[PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","startedAt":"2010-04-15T14:41:59Z","lastAt":"2010-04-17T18:16:37Z","messageCount":12,"participants":["Chris Webb","Thomas Rast","Jonathan Nieder","Santi Béjar","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"139595","messageId":"9946ffbdf26e7b08b9b00b87d4b575fea774be4c.1271342450.git.chris@arachsys.com","threadId":"23479","inReplyTo":null,"subject":"[PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-15T14:41:59Z","receivedAt":"2010-04-15T14:41:59Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Put the current date in the 'From COMMIT DATE' header line instead of using\nthe fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is\nintroduced so we can easily generate this line in the correct format.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n builtin/blame.c |    1 +\n cache.h         |    3 ++-\n date.c          |    4 +++-\n log-tree.c      |    2 +-\n 4 files changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex fc15863..42fb1bd 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -2301,6 +2301,7 @@ parse_done:\n \t\t/* \"normal\" is used as the fallback for \"relative\" */\n \tcase DATE_LOCAL:\n \tcase DATE_NORMAL:\n+\tcase DATE_UTC:\n \t\tblame_date_width = sizeof(\"Thu Oct 19 16:00:04 2006 -0700\");\n \t\tbreak;\n \t}\ndiff --git a/cache.h b/cache.h\nindex 5eb0573..fdb0643 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -769,7 +769,8 @@ enum date_mode {\n \tDATE_LOCAL,\n \tDATE_ISO8601,\n \tDATE_RFC2822,\n-\tDATE_RAW\n+\tDATE_RAW,\n+\tDATE_UTC\n };\n \n const char *show_date(unsigned long time, int timezone, enum date_mode mode);\ndiff --git a/date.c b/date.c\nindex 002aa3c..88b1b58 100644\n--- a/date.c\n+++ b/date.c\n@@ -166,6 +166,8 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)\n \n \tif (mode == DATE_LOCAL)\n \t\ttz = local_tzoffset(time);\n+\telse if (mode == DATE_UTC)\n+\t\ttz = 0;\n \n \ttm = time_to_tm(time, tz);\n \tif (!tm)\n@@ -192,7 +194,7 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)\n \t\t\t\ttm->tm_mday,\n \t\t\t\ttm->tm_hour, tm->tm_min, tm->tm_sec,\n \t\t\t\ttm->tm_year + 1900,\n-\t\t\t\t(mode == DATE_LOCAL) ? 0 : ' ',\n+\t\t\t\t(mode != DATE_NORMAL) ? 0 : ' ',\n \t\t\t\ttz);\n \treturn timebuf;\n }\ndiff --git a/log-tree.c b/log-tree.c\nindex d3ae969..798baf6 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -217,7 +217,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,\n \t\tsubject = \"Subject: \";\n \t}\n \n-\tprintf(\"From %s Mon Sep 17 00:00:00 2001\\n\", name);\n+\tprintf(\"From %s %s\\n\", name, show_date(time(NULL), 0, DATE_UTC));\n \tgraph_show_oneline(opt->graph);\n \tif (opt->message_id) {\n \t\tprintf(\"Message-Id: <%s>\\n\", opt->message_id);\n-- \n1.7.0.3\n"},{"id":"139596","messageId":"20100415151619.GK12365@arachsys.com","threadId":"23479","inReplyTo":"9946ffbdf26e7b08b9b00b87d4b575fea774be4c.1271342450.git.chris@arachsys.com","subject":"Re: [PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-15T15:16:21Z","receivedAt":"2010-04-15T15:16:21Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Chris Webb <chris@arachsys.com> writes:\n\n> Put the current date in the 'From COMMIT DATE' header line instead of using\n> the fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is\n> introduced so we can easily generate this line in the correct format.\n\n...but this will break t4013-diff-various which expects the exact date\nstring 'Mon Sep 17 00:00:00 2001' in the mbox header. Patch to fix this test\nto follow!\n\nCheers,\n\nChris.\n"},{"id":"139597","messageId":"201004151735.31415.trast@student.ethz.ch","threadId":"23479","inReplyTo":"20100415151619.GK12365@arachsys.com","subject":"Re: [PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-04-15T15:35:31Z","receivedAt":"2010-04-15T15:35:31Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Chris Webb wrote:\n> Chris Webb <chris@arachsys.com> writes:\n> \n> > Put the current date in the 'From COMMIT DATE' header line instead of using\n> > the fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is\n> > introduced so we can easily generate this line in the correct format.\n> \n> ...but this will break t4013-diff-various which expects the exact date\n> string 'Mon Sep 17 00:00:00 2001' in the mbox header. Patch to fix this test\n> to follow!\n\nHave you read\n\n  http://thread.gmane.org/gmane.comp.version-control.git/124082/focus=124092\n\nNot that I really care either way, but you should at least convince us\nwhy it is broken as it stands :-)\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"139598","messageId":"20100415155523.GL12365@arachsys.com","threadId":"23479","inReplyTo":"201004151735.31415.trast@student.ethz.ch","subject":"Re: [PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-15T15:55:23Z","receivedAt":"2010-04-15T15:55:23Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> Have you read\n> \n>   http://thread.gmane.org/gmane.comp.version-control.git/124082/focus=124092\n\nI hadn't but have now. I don't buy the idea that this date is an unused\nplaceholder in mbox files, and therefore can be sensibly set to an arbitary\nconstant date in the distant past.\n\nRFC4155 appendix A defines this date as the date a message was received.\nThis isn't directly applicable to the context of format-patch, but other\nusers of mbox format (e.g. MUAs doing an fcc) tend to fill it with the date\nthe message was generated, and might reasonably expect to be able to\nsort on this date, e.g. when displaying a drafts folder.\n\nIf nothing else, it's extremely surprising to run format-patch, see a\nridiculous date and wonder how your system time has become corrupted while\nyou've been working!\n\nCheers,\n\nChris.\n"},{"id":"139599","messageId":"d64c9b1fe1b02cdf9f67760e43141c3410388957.1271346952.git.chris@arachsys.com","threadId":"23479","inReplyTo":"20100415151619.GK12365@arachsys.com","subject":"[PATCH] Fix t4013 with current date in mbox 'From COMMIT DATE' header lines","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-15T15:57:46Z","receivedAt":"2010-04-15T15:57:46Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Signed-off-by: Chris Webb <chris@arachsys.com>\n---\n t/t4013-diff-various.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex dae6358..ce42d3f 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -110,7 +110,8 @@ do\n \t\t\techo \"\\$ git $cmd\"\n \t\t\tgit $cmd |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n-\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n+\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\" \\\n+\t\t\t    -e \"s/^\\\\(From [0-9a-f][0-9a-f]*\\\\) .*/\\\\1 Mon Sep 17 00:00:00 2001/\"\n \t\t\techo \"\\$\"\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\n-- \n1.7.0.3\n"},{"id":"139636","messageId":"20100415231945.GA20584@progeny.tock","threadId":"23479","inReplyTo":"9946ffbdf26e7b08b9b00b87d4b575fea774be4c.1271342450.git.chris@arachsys.com","subject":"Re: [PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-04-15T23:19:46Z","receivedAt":"2010-04-15T23:19:46Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nChris Webb wrote:\n\n> Put the current date in the 'From COMMIT DATE' header line instead of using\n> the fixed date 'Mon Sep 17 00:00:00 2001'.\n\nPlease no.  It is useful that format-patch generates the same output\nwhen run a few times in a row.\n\nIf it is important to have a realistic date, would the commit date or\nsimilar work?\n\nJonathan\n"},{"id":"139657","messageId":"20100416075251.GA25147@arachsys.com","threadId":"23479","inReplyTo":"20100415231945.GA20584@progeny.tock","subject":"Re: [PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-16T07:52:51Z","receivedAt":"2010-04-16T07:52:51Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Please no.  It is useful that format-patch generates the same output when\n> run a few times in a row. If it is important to have a realistic date,\n> would the commit date or similar work?\n\nYes, sure: s/time(NULL)/commit->date/ works equally well for me.\n\nBest wishes,\n\nChris.\n"},{"id":"139682","messageId":"39d9b1c49e6d8e28eed7fa8d2817dc55834011fb.1271436192.git.chris@arachsys.com","threadId":"23479","inReplyTo":"20100416075251.GA25147@arachsys.com","subject":"[PATCH v2 1/2] format-patch: use commit date in mbox 'From COMMIT DATE' header line","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-16T16:42:02Z","receivedAt":"2010-04-16T16:42:02Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Put the commit date in the 'From COMMIT DATE' header line instead of using\nthe fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is\nintroduced so we can easily generate this line in the correct format.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n builtin/blame.c |    1 +\n cache.h         |    3 ++-\n date.c          |    4 +++-\n log-tree.c      |    2 +-\n 4 files changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex fc15863..42fb1bd 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -2301,6 +2301,7 @@ parse_done:\n \t\t/* \"normal\" is used as the fallback for \"relative\" */\n \tcase DATE_LOCAL:\n \tcase DATE_NORMAL:\n+\tcase DATE_UTC:\n \t\tblame_date_width = sizeof(\"Thu Oct 19 16:00:04 2006 -0700\");\n \t\tbreak;\n \t}\ndiff --git a/cache.h b/cache.h\nindex 5eb0573..fdb0643 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -769,7 +769,8 @@ enum date_mode {\n \tDATE_LOCAL,\n \tDATE_ISO8601,\n \tDATE_RFC2822,\n-\tDATE_RAW\n+\tDATE_RAW,\n+\tDATE_UTC\n };\n \n const char *show_date(unsigned long time, int timezone, enum date_mode mode);\ndiff --git a/date.c b/date.c\nindex 002aa3c..88b1b58 100644\n--- a/date.c\n+++ b/date.c\n@@ -166,6 +166,8 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)\n \n \tif (mode == DATE_LOCAL)\n \t\ttz = local_tzoffset(time);\n+\telse if (mode == DATE_UTC)\n+\t\ttz = 0;\n \n \ttm = time_to_tm(time, tz);\n \tif (!tm)\n@@ -192,7 +194,7 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)\n \t\t\t\ttm->tm_mday,\n \t\t\t\ttm->tm_hour, tm->tm_min, tm->tm_sec,\n \t\t\t\ttm->tm_year + 1900,\n-\t\t\t\t(mode == DATE_LOCAL) ? 0 : ' ',\n+\t\t\t\t(mode != DATE_NORMAL) ? 0 : ' ',\n \t\t\t\ttz);\n \treturn timebuf;\n }\ndiff --git a/log-tree.c b/log-tree.c\nindex d3ae969..90262f9 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -217,7 +217,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,\n \t\tsubject = \"Subject: \";\n \t}\n \n-\tprintf(\"From %s Mon Sep 17 00:00:00 2001\\n\", name);\n+\tprintf(\"From %s %s\\n\", name, show_date(commit->date, 0, DATE_UTC));\n \tgraph_show_oneline(opt->graph);\n \tif (opt->message_id) {\n \t\tprintf(\"Message-Id: <%s>\\n\", opt->message_id);\n-- \n1.7.0.3\n"},{"id":"139683","messageId":"2b1d2ec748f3a28e7210f235df29703fd425e08a.1271436192.git.chris@arachsys.com","threadId":"23479","inReplyTo":"20100416075251.GA25147@arachsys.com","subject":"[PATCH 2/2] Fix t4013 with commit date in mbox 'From COMMIT DATE' header lines","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-16T16:42:36Z","receivedAt":"2010-04-16T16:42:36Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Signed-off-by: Chris Webb <chris@arachsys.com>\n---\n t/t4013-diff-various.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex dae6358..ce42d3f 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -110,7 +110,8 @@ do\n \t\t\techo \"\\$ git $cmd\"\n \t\t\tgit $cmd |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n-\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n+\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\" \\\n+\t\t\t    -e \"s/^\\\\(From [0-9a-f][0-9a-f]*\\\\) .*/\\\\1 Mon Sep 17 00:00:00 2001/\"\n \t\t\techo \"\\$\"\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\n-- \n1.7.0.3\n"},{"id":"139690","messageId":"o2jadf1fd3d1004161059z5b85989br9984fac87ac7e92b@mail.gmail.com","threadId":"23479","inReplyTo":"2b1d2ec748f3a28e7210f235df29703fd425e08a.1271436192.git.chris@arachsys.com","subject":"Re: [PATCH 2/2] Fix t4013 with commit date in mbox 'From COMMIT DATE' header lines","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2010-04-16T17:59:32Z","receivedAt":"2010-04-16T17:59:32Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"It is better if you squash this patch into the earlier one, then the\ntests always pass.\n\nSanti\n\nOn Fri, Apr 16, 2010 at 6:42 PM, Chris Webb <chris@arachsys.com> wrote:\n> Signed-off-by: Chris Webb <chris@arachsys.com>\n> ---\n>  t/t4013-diff-various.sh |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n>\n> diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\n> index dae6358..ce42d3f 100755\n> --- a/t/t4013-diff-various.sh\n> +++ b/t/t4013-diff-various.sh\n> @@ -110,7 +110,8 @@ do\n>                        echo \"\\$ git $cmd\"\n>                        git $cmd |\n>                        sed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n> -                           -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n> +                           -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\" \\\n> +                           -e \"s/^\\\\(From [0-9a-f][0-9a-f]*\\\\) .*/\\\\1 Mon Sep 17 00:00:00 2001/\"\n>                        echo \"\\$\"\n>                } >\"$actual\" &&\n>                if test -f \"$expect\"\n> --\n> 1.7.0.3\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"139724","messageId":"f71d42d6949caffa6f79278888c59fb4232bb277.1271490953.git.chris@arachsys.com","threadId":"23479","inReplyTo":"o2jadf1fd3d1004161059z5b85989br9984fac87ac7e92b@mail.gmail.com","subject":"[PATCH v3] format-patch: use commit date in mbox 'From COMMIT DATE' header line","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-17T08:01:58Z","receivedAt":"2010-04-17T08:01:58Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Put the commit date in the 'From COMMIT DATE' header line instead of using\nthe fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is\nintroduced so we can easily generate this line in the correct format, and\nt4013 is fixed not to expect a constant From line.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n builtin/blame.c         |    1 +\n cache.h                 |    3 ++-\n date.c                  |    4 +++-\n log-tree.c              |    2 +-\n t/t4013-diff-various.sh |    3 ++-\n 5 files changed, 9 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex fc15863..42fb1bd 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -2301,6 +2301,7 @@ parse_done:\n \t\t/* \"normal\" is used as the fallback for \"relative\" */\n \tcase DATE_LOCAL:\n \tcase DATE_NORMAL:\n+\tcase DATE_UTC:\n \t\tblame_date_width = sizeof(\"Thu Oct 19 16:00:04 2006 -0700\");\n \t\tbreak;\n \t}\ndiff --git a/cache.h b/cache.h\nindex 5eb0573..fdb0643 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -769,7 +769,8 @@ enum date_mode {\n \tDATE_LOCAL,\n \tDATE_ISO8601,\n \tDATE_RFC2822,\n-\tDATE_RAW\n+\tDATE_RAW,\n+\tDATE_UTC\n };\n \n const char *show_date(unsigned long time, int timezone, enum date_mode mode);\ndiff --git a/date.c b/date.c\nindex 002aa3c..88b1b58 100644\n--- a/date.c\n+++ b/date.c\n@@ -166,6 +166,8 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)\n \n \tif (mode == DATE_LOCAL)\n \t\ttz = local_tzoffset(time);\n+\telse if (mode == DATE_UTC)\n+\t\ttz = 0;\n \n \ttm = time_to_tm(time, tz);\n \tif (!tm)\n@@ -192,7 +194,7 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)\n \t\t\t\ttm->tm_mday,\n \t\t\t\ttm->tm_hour, tm->tm_min, tm->tm_sec,\n \t\t\t\ttm->tm_year + 1900,\n-\t\t\t\t(mode == DATE_LOCAL) ? 0 : ' ',\n+\t\t\t\t(mode != DATE_NORMAL) ? 0 : ' ',\n \t\t\t\ttz);\n \treturn timebuf;\n }\ndiff --git a/log-tree.c b/log-tree.c\nindex d3ae969..90262f9 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -217,7 +217,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,\n \t\tsubject = \"Subject: \";\n \t}\n \n-\tprintf(\"From %s Mon Sep 17 00:00:00 2001\\n\", name);\n+\tprintf(\"From %s %s\\n\", name, show_date(commit->date, 0, DATE_UTC));\n \tgraph_show_oneline(opt->graph);\n \tif (opt->message_id) {\n \t\tprintf(\"Message-Id: <%s>\\n\", opt->message_id);\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex dae6358..ce42d3f 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -110,7 +110,8 @@ do\n \t\t\techo \"\\$ git $cmd\"\n \t\t\tgit $cmd |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n-\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n+\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\" \\\n+\t\t\t    -e \"s/^\\\\(From [0-9a-f][0-9a-f]*\\\\) .*/\\\\1 Mon Sep 17 00:00:00 2001/\"\n \t\t\techo \"\\$\"\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\n-- \n1.7.0.3\n"},{"id":"139768","messageId":"7v1vee0wsa.fsf@alter.siamese.dyndns.org","threadId":"23479","inReplyTo":"201004151735.31415.trast@student.ethz.ch","subject":"Re: [PATCH] format-patch: use current date in mbox 'From COMMIT DATE' header line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-17T18:16:37Z","receivedAt":"2010-04-17T18:16:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> Chris Webb wrote:\n>> Chris Webb <chris@arachsys.com> writes:\n>> \n>> > Put the current date in the 'From COMMIT DATE' header line instead of using\n>> > the fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is\n>> > introduced so we can easily generate this line in the correct format.\n>> \n>> ...but this will break t4013-diff-various which expects the exact date\n>> string 'Mon Sep 17 00:00:00 2001' in the mbox header. Patch to fix this test\n>> to follow!\n>\n> Have you read\n>\n>   http://thread.gmane.org/gmane.comp.version-control.git/124082/focus=124092\n\nThanks for a sanity.\n"}]}