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

Re: Bug in git-log --date=short --pretty=format:"%ad"

From
Junio C Hamano <gitster@pobox.com>
Date
May 28, 2008, 15:11 UTC
Message-ID
<7vd4n6wji9.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.1.10.0805281535560.8172@adsl.cgsecurity.org>
Christophe GRENIER <grenier@cgsecurity.org> writes:
Show 8 quoted lines
> According to the git-log man page, we can configure how date are
> displayed:
>
> --date={relative,local,default,iso,rfc}
>   Only takes effect for dates shown in human-readable format,
>   such as when using "--pretty".
>
> But it doesn't work when a user supplied format is used:

Sorry, in theory, perhaps they could, but it doesn't and it never did. The output is working as designed and intended.

You probably could send a patch to add %aT and %cT that are defined as "author/committer date in the format specified with --date=<this> option"; but "%ad" and "%cd" are defined to emit "author/committer date always in the default format".

Previous: Christophe GRENIER
Message 2 of 2 in “Bug in git-log --date=short --pretty=format:"%ad"”
  1. Christophe GRENIERMay 28, 2008
  2. Junio C HamanoMay 28, 2008

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.