{"thread":{"id":"46297","subject":"git log use of date format differs between Command Line and script usage.","startedAt":"2017-06-30T16:06:07Z","lastAt":"2017-06-30T17:29:42Z","messageCount":4,"participants":["Shaun Uldrikis","René Scharfe","Stefan Beller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"323572","messageId":"CADHEqX_fiUhnpn6WAFrbDaNJTb1Vbom7Ndn-n6WmQ0gkQ69ZeA@mail.gmail.com","threadId":"46297","inReplyTo":null,"subject":"git log use of date format differs between Command Line and script usage.","fromName":"Shaun Uldrikis","fromEmail":"stuldrikis@gmail.com","sentAt":"2017-06-30T16:06:02Z","receivedAt":"2017-06-30T16:06:07Z","isPatch":false,"sender":{"key":"stuldrikis@gmail.com","avatar":null},"body":"If you supply a non-standard format to the date configuration for git\nlog, something like:\n[log]\n        date = format:%Y-%m-%d %H:%M\n\nthen, when you run 'git log' inside a script, or when using gitk\n(anywhere), it fails on decoding the format.\n\nfatal: unknown date format format: %Y-%m-%d %H:%M\n\n\nHowever, that format works correctly on the command line.\nI do not have a patch to address this issue.\n\n-Shaun\n"},{"id":"323574","messageId":"7e7c7d22-36e2-20f4-0cfc-8cfe37d9a409@web.de","threadId":"46297","inReplyTo":"CADHEqX_fiUhnpn6WAFrbDaNJTb1Vbom7Ndn-n6WmQ0gkQ69ZeA@mail.gmail.com","subject":"Re: git log use of date format differs between Command Line and script usage.","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2017-06-30T16:41:56Z","receivedAt":"2017-06-30T16:42:12Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 30.06.2017 um 18:06 schrieb Shaun Uldrikis:\n> If you supply a non-standard format to the date configuration for git\n> log, something like:\n> [log]\n>          date = format:%Y-%m-%d %H:%M\n> \n> then, when you run 'git log' inside a script, or when using gitk\n> (anywhere), it fails on decoding the format.\n> \n> fatal: unknown date format format: %Y-%m-%d %H:%M\n> \n> \n> However, that format works correctly on the command line.\n> I do not have a patch to address this issue.\n\nI guess you have two versions of git on your system, and the one used in\nscripts is older than 2.6.0, which introduced this feature.\n\nRené\n"},{"id":"323575","messageId":"CAGZ79kZxde9j+O4JDofYLbC2CRk_X0tiwOftEgKQcJLyN409xQ@mail.gmail.com","threadId":"46297","inReplyTo":"CADHEqX_fiUhnpn6WAFrbDaNJTb1Vbom7Ndn-n6WmQ0gkQ69ZeA@mail.gmail.com","subject":"Re: git log use of date format differs between Command Line and script usage.","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-06-30T16:43:18Z","receivedAt":"2017-06-30T16:43:24Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Fri, Jun 30, 2017 at 9:06 AM, Shaun Uldrikis <stuldrikis@gmail.com> wrote:\n> If you supply a non-standard format to the date configuration for git\n> log, something like:\n> [log]\n>         date = format:%Y-%m-%d %H:%M\n\nSo I ran\n\n    $ git config log.date  \"format:%Y-%m-%d %H:%M\"\n    $ git config --list |grep log.date\n    log.date=format:%Y-%m-%d %H:%M\n\nThen I have a script as\n  $ cat script.sh\n  #!/bin/sh\n\n  git log >out\n\nafter executing I get:\n\n  $ head out\n  commit 7930db48ca31b41ac335ae8cd25cb29094d1de5e\n  Author: Stefan Beller <sbeller@google.com>\n  Date:   2017-06-30 09:26\n\nAlso gitk seems to work here.\n\nRene's answer sounds reasonable,\ncheck the version(s) of Git on your system?\n"},{"id":"323579","messageId":"CADHEqX9-w5uZpS1RiP9EjCpWB0V1SVYZ5Ddsv3etCvBteOv4qg@mail.gmail.com","threadId":"46297","inReplyTo":"CAGZ79kZxde9j+O4JDofYLbC2CRk_X0tiwOftEgKQcJLyN409xQ@mail.gmail.com","subject":"Re: git log use of date format differs between Command Line and script usage.","fromName":"Shaun Uldrikis","fromEmail":"stuldrikis@gmail.com","sentAt":"2017-06-30T17:29:36Z","receivedAt":"2017-06-30T17:29:42Z","isPatch":false,"sender":{"key":"stuldrikis@gmail.com","avatar":null},"body":"Yes. That is the case. Just confirmed it. I'll remove the old version.\nSorry to have bothered the mailing list.\n\nThank you.\n\n-Shaun\n\nOn Fri, Jun 30, 2017 at 12:43 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Fri, Jun 30, 2017 at 9:06 AM, Shaun Uldrikis <stuldrikis@gmail.com> wrote:\n>> If you supply a non-standard format to the date configuration for git\n>> log, something like:\n>> [log]\n>>         date = format:%Y-%m-%d %H:%M\n>\n> So I ran\n>\n>     $ git config log.date  \"format:%Y-%m-%d %H:%M\"\n>     $ git config --list |grep log.date\n>     log.date=format:%Y-%m-%d %H:%M\n>\n> Then I have a script as\n>   $ cat script.sh\n>   #!/bin/sh\n>\n>   git log >out\n>\n> after executing I get:\n>\n>   $ head out\n>   commit 7930db48ca31b41ac335ae8cd25cb29094d1de5e\n>   Author: Stefan Beller <sbeller@google.com>\n>   Date:   2017-06-30 09:26\n>\n> Also gitk seems to work here.\n>\n> Rene's answer sounds reasonable,\n> check the version(s) of Git on your system?\n"}]}