{"thread":{"id":"52443","subject":"Gmail munges dates?","startedAt":"2019-12-13T01:56:53Z","lastAt":"2019-12-13T20:40:02Z","messageCount":4,"participants":["Denton Liu","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"388072","messageId":"20191213015753.GA14249@generichostname","threadId":"52443","inReplyTo":null,"subject":"Gmail munges dates?","fromName":"Denton Liu","fromEmail":"liu.denton@gmail.com","sentAt":"2019-12-13T01:57:53Z","receivedAt":"2019-12-13T01:56:53Z","isPatch":false,"sender":{"key":"liu.denton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9620836?v=4"},"body":"Hi all,\n\nIt seems like Gmail is munging the dates on patches sent. Before today,\nI've been sending patches out with mutt but I decided to switch to\ngit-send-email today since I was forwarding a patch that wasn't mine and\nI wanted to preserve the date as part of the authorship information.\n\nUnfortunately, it seems like mutt wasn't the culprit, it was Gmail\nthat's been munging the dates. For example, in this patch[1], the date\nshows as\n\n\tDate: Thu, 12 Dec 2019 16:44:50 -0800\n\neven though locally, the output of the format-patch shows as\n\n\tDate: Mon, 9 Dec 2019 19:25:34 +0100\n\nSo two questions related to this:\n\n1. Is this something that we care about or is it okay to have fudged\ndates? (I know all of my patches in each patchset only differ by a few\nseconds and it seems like no one has noticed or cared so far)\n\n2. Do we want to introduce a --in-body-date option or something to\nformat-patch which would include an in-body Date:, similar to the\nin-body From:? (Also, while we're at it, maybe we could include an\n--in-body-from to force that to happen since that's been a feature that\nwas requested in the past[2])\n\nThanks,\n\nDenton\n\n[1]: https://lore.kernel.org/git/8691ed2b84f7ee6b7c12d04d57a541bf22660333.1576197846.git.liu.denton@gmail.com/\n[2]: https://lore.kernel.org/git/20191010225405.GA19475@sigill.intra.peff.net/\n"},{"id":"388080","messageId":"20191213054227.GA76445@coredump.intra.peff.net","threadId":"52443","inReplyTo":"20191213015753.GA14249@generichostname","subject":"Re: Gmail munges dates?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-12-13T05:42:27Z","receivedAt":"2019-12-13T05:42:29Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Dec 12, 2019 at 05:57:53PM -0800, Denton Liu wrote:\n\n> It seems like Gmail is munging the dates on patches sent. Before today,\n> I've been sending patches out with mutt but I decided to switch to\n> git-send-email today since I was forwarding a patch that wasn't mine and\n> I wanted to preserve the date as part of the authorship information.\n> \n> Unfortunately, it seems like mutt wasn't the culprit, it was Gmail\n> that's been munging the dates. For example, in this patch[1], the date\n> shows as\n> \n> \tDate: Thu, 12 Dec 2019 16:44:50 -0800\n> \n> even though locally, the output of the format-patch shows as\n> \n> \tDate: Mon, 9 Dec 2019 19:25:34 +0100\n\nBoth mutt and git-send-email will munge the headers. And they really\nneed to, since sending a message whose Date header is several days old\n(or much more, in some cases) is likely to trigger spam filters.\n\n> So two questions related to this:\n> \n> 1. Is this something that we care about or is it okay to have fudged\n> dates? (I know all of my patches in each patchset only differ by a few\n> seconds and it seems like no one has noticed or cared so far)\n\nIt's OK to have fudged dates. In fact, I think you could make an\nargument that it's preferable for our development flow. It treats the\npatch hitting the list as the moment of authorship. When reading \"git\nlog\" later, that would put its author date near its peers. Of course in\na non-linear history you probably care more about \"when did this hit\nmaster\", but the author timestamps are a rough approximation for \"era\".\nAnd of course the committer information could tell you more there, but\nwe don't tend to show it by default.\n\nSo I think there are philosophical arguments to be made, but for\npractical purposes, I think everybody is reasonably happy with the\ncurrent mechanisms.\n\nThere are cases when you might want to preserve old date information\n(say, re-sending a patch that was several years old). Usually in that\ncase I'd leave the author date as current but make a note about the\npatch's history if it's relevant.\n\n\n> 2. Do we want to introduce a --in-body-date option or something to\n> format-patch which would include an in-body Date:, similar to the\n> in-body From:? (Also, while we're at it, maybe we could include an\n> --in-body-from to force that to happen since that's been a feature that\n> was requested in the past[2])\n\nI doubt I'd use it myself, but I wouldn't be opposed to an in-body-date\noption. You'd perhaps want to define some heuristics to avoid\nuninteresting noise. If your patch is from 10 minutes ago, and you are\njust now sending it in, adding the extra date header is mostly just\nclutter. So perhaps you'd want it to kick in when the date is more than\nN time units or something.\n\n-Peff\n"},{"id":"388131","messageId":"xmqqy2vgkth9.fsf@gitster-ct.c.googlers.com","threadId":"52443","inReplyTo":"20191213015753.GA14249@generichostname","subject":"Re: Gmail munges dates?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-12-13T17:47:46Z","receivedAt":"2019-12-13T20:39:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Denton Liu <liu.denton@gmail.com> writes:\n\n> Unfortunately, it seems like mutt wasn't the culprit, it was Gmail\n> that's been munging the dates. For example, in this patch[1], the date\n> shows as\n>\n> \tDate: Thu, 12 Dec 2019 16:44:50 -0800\n>\n> even though locally, the output of the format-patch shows as\n>\n> \tDate: Mon, 9 Dec 2019 19:25:34 +0100\n\n\"git send-email\" records the timestamp of sending.  If you really\nwant to force a specific author date, you could add a in-body Date:\nbut it is discouraged in mailing-list centric workflow, because it\nis more natural for everybody other than the author to consider that\nthe time the patch hits the list, i.e. the public eyes, is when the\npatch was \"authored\".\n\n"},{"id":"388133","messageId":"xmqqtv64kt9n.fsf@gitster-ct.c.googlers.com","threadId":"52443","inReplyTo":"20191213054227.GA76445@coredump.intra.peff.net","subject":"Re: Gmail munges dates?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-12-13T17:52:20Z","receivedAt":"2019-12-13T20:40:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>> 2. Do we want to introduce a --in-body-date option or something to\n>> format-patch which would include an in-body Date:, similar to the\n>> in-body From:? (Also, while we're at it, maybe we could include an\n>> --in-body-from to force that to happen since that's been a feature that\n>> was requested in the past[2])\n>\n> I doubt I'd use it myself, but I wouldn't be opposed to an in-body-date\n> option. You'd perhaps want to define some heuristics to avoid\n> uninteresting noise. If your patch is from 10 minutes ago, and you are\n> just now sending it in, adding the extra date header is mostly just\n> clutter. So perhaps you'd want it to kick in when the date is more than\n> N time units or something.\n\nI do not have a fundamental objection to the --in-body-date option,\neither, although I do not want to see it used when sending patches\nto this list.\n\nAs long as it is a command-line per-invocation option, I do not\nthink you'd need any \"uninteresting noise filtering\" logic.  A\nconfiguration variable to always do so would cause a huge headache\nto keep the behaviour sensible when sending one's own patches,\nand would require such filtering, I would think.\n\nThanks.\n"}]}