git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git log use of date format differs between Command Line and script usage.

From
René Scharfe <l.s.r@web.de>
Date
Jun 30, 2017, 16:41 UTC
Message-ID
<7e7c7d22-36e2-20f4-0cfc-8cfe37d9a409@web.de>
In-Reply-To
<CADHEqX_fiUhnpn6WAFrbDaNJTb1Vbom7Ndn-n6WmQ0gkQ69ZeA@mail.gmail.com>
Am 30.06.2017 um 18:06 schrieb Shaun Uldrikis:
Show 13 quoted lines
> If you supply a non-standard format to the date configuration for git
> log, something like:
> [log]
>          date = format:%Y-%m-%d %H:%M
> 
> then, when you run 'git log' inside a script, or when using gitk
> (anywhere), it fails on decoding the format.
> 
> fatal: unknown date format format: %Y-%m-%d %H:%M
> 
> 
> However, that format works correctly on the command line.
> I do not have a patch to address this issue.

I guess you have two versions of git on your system, and the one used in scripts is older than 2.6.0, which introduced this feature.

René
Previous: Shaun UldrikisNext: Stefan Beller
Message 2 of 4 in “git log use of date format differs between Command Line and script usage.”
  1. Shaun UldrikisJun 30, 2017
  2. René ScharfeJun 30, 2017
  3. Stefan BellerJun 30, 2017
  4. Shaun UldrikisJun 30, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.