{"thread":{"id":"37699","subject":"git-archive doesn't support --date= option for %ad & %cd format:<string>'s","startedAt":"2014-10-09T16:19:36Z","lastAt":"2014-10-09T19:30:08Z","messageCount":4,"participants":["Derek Moore","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250429","messageId":"CAMsgyKaHoZtAidWKD_YTggt_Xo0J7krFKHr2eFeg3XJ6H0bBXQ@mail.gmail.com","threadId":"37699","inReplyTo":null,"subject":"git-archive doesn't support --date= option for %ad & %cd format:<string>'s","fromName":"Derek Moore","fromEmail":"derek.p.moore@gmail.com","sentAt":"2014-10-09T16:19:36Z","receivedAt":"2014-10-09T16:19:36Z","isPatch":false,"sender":{"key":"derek.p.moore@gmail.com","avatar":"https://gravatar.com/avatar/4bf86633cdd04eb5d07180791de5ae0ece9f3d04b34f6e13fdb81d563fc62c23?d=mp&s=160"},"body":"PRETTY FORMATS' format:<string> documentation says, \"%ad: author date\n(format respects --date= option)\", and similarly for %cd.\n\nBut git-archive does not support the --date= option for changing the\ndate format in $Format:%ad$ or $Format:%cd$ substitution strings.\n\n\nRelatedly, I want a short RFC date, not a short ISO date, but there is\nonly --date=short, which is ISO.\n\nWould introducing --date=shortrfc and --date=shortiso be feasable,\nwith --date=short aliasing to --date=shortiso. With a shortrfc, I\ncould recreate SVN $Date$'s, which would be equivalent to $Format:%ai\n(%ad)$ when used with \"git archive --date=shortrfc\".\n\nThanks,\n\nDerek\n"},{"id":"250444","messageId":"20141009192428.GB415@peff.net","threadId":"37699","inReplyTo":"CAMsgyKaHoZtAidWKD_YTggt_Xo0J7krFKHr2eFeg3XJ6H0bBXQ@mail.gmail.com","subject":"Re: git-archive doesn't support --date= option for %ad & %cd format:<string>'s","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-10-09T19:24:28Z","receivedAt":"2014-10-09T19:24:28Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 09, 2014 at 11:19:36AM -0500, Derek Moore wrote:\n\n> PRETTY FORMATS' format:<string> documentation says, \"%ad: author date\n> (format respects --date= option)\", and similarly for %cd.\n> \n> But git-archive does not support the --date= option for changing the\n> date format in $Format:%ad$ or $Format:%cd$ substitution strings.\n\nCorrect. You can use %ai, %aD, etc to pick a format. But...\n\n> Relatedly, I want a short RFC date, not a short ISO date, but there is\n> only --date=short, which is ISO.\n\nIf you start adding new formats, we are likely going to run out of\nreasonably-memorable letters.\n\nWe've discussed something like \"%ad(rfc822)\" in the past, and I even had\na patch:\n\n  http://article.gmane.org/gmane.comp.version-control.git/168512\n\nbut it got bogged down in a discussion on potentially expanding the\nplaceholder syntax to something more regular (probably\n\"%(authordate:rfc822\"), like for-each-ref does. That's from 2011, and I\ndoubt anybody is working on it now.\n\n> Would introducing --date=shortrfc and --date=shortiso be feasable,\n> with --date=short aliasing to --date=shortiso. With a shortrfc, I\n> could recreate SVN $Date$'s, which would be equivalent to $Format:%ai\n> (%ad)$ when used with \"git archive --date=shortrfc\".\n\nI don't see a big problem with that. But I wonder if we would do better\nto introduce arbitrary strftime-like formatting, so we do not have to\nkeep adding new formats.\n\n-Peff\n"},{"id":"250446","messageId":"20141009192742.GC415@peff.net","threadId":"37699","inReplyTo":"20141009192428.GB415@peff.net","subject":"Re: git-archive doesn't support --date= option for %ad & %cd format:<string>'s","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-10-09T19:27:43Z","receivedAt":"2014-10-09T19:27:43Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 09, 2014 at 03:24:28PM -0400, Jeff King wrote:\n\n> On Thu, Oct 09, 2014 at 11:19:36AM -0500, Derek Moore wrote:\n> \n> > PRETTY FORMATS' format:<string> documentation says, \"%ad: author date\n> > (format respects --date= option)\", and similarly for %cd.\n> > \n> > But git-archive does not support the --date= option for changing the\n> > date format in $Format:%ad$ or $Format:%cd$ substitution strings.\n> \n> Correct. You can use %ai, %aD, etc to pick a format. But...\n> \n> > Relatedly, I want a short RFC date, not a short ISO date, but there is\n> > only --date=short, which is ISO.\n> \n> If you start adding new formats, we are likely going to run out of\n> reasonably-memorable letters.\n> [...]\n\nI meant to add in here: ...so an external \"--date\" option does not seem\nlike that bad an idea. I think calling it \"--date\" is probably a\nmistake, but something like \"--subst-date-format\" or something might\nmake more sense.\n\n-Peff\n"},{"id":"250447","messageId":"CAMsgyKZWiPwGLEx=_s6UYMmMzEj-gFWngKgudQhjge2v2avfeg@mail.gmail.com","threadId":"37699","inReplyTo":"20141009192428.GB415@peff.net","subject":"Re: git-archive doesn't support --date= option for %ad & %cd format:<string>'s","fromName":"Derek Moore","fromEmail":"derek.p.moore@gmail.com","sentAt":"2014-10-09T19:30:08Z","receivedAt":"2014-10-09T19:30:08Z","isPatch":false,"sender":{"key":"derek.p.moore@gmail.com","avatar":"https://gravatar.com/avatar/4bf86633cdd04eb5d07180791de5ae0ece9f3d04b34f6e13fdb81d563fc62c23?d=mp&s=160"},"body":"> I don't see a big problem with that. But I wonder if we would do better\n> to introduce arbitrary strftime-like formatting, so we do not have to\n> keep adding new formats.\n\nMy thoughts exactly...\n\nThis list seems to be a prove-yourself-with-patches sorta place. If I\ncan find the time, I'll try attacking this also in some manner.\n\nThanks again,\n\nDerek\n"}]}