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

Re: [PATCH 1/1] pretty: note that %cd respects the --date= option

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 21, 2014, 20:07 UTC
Message-ID
<xmqqr409r4i7.fsf@gitster.dls.corp.google.com>
In-Reply-To
<53F4941E.2060201@virtuell-zuhause.de>
Thomas Braun <thomas.braun@virtuell-zuhause.de> writes:
Show 29 quoted lines
> Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
> ---
>
> Today I found out that both %cd and %ad pretty print format
> specifications honour the --date option as shown in:
>
> $ git log --abbrev=8 --date=short --pretty="%h (%s, %cd)" -n1
> 5bdb1c4e (Merge pull request #245 from
> kblees/kb/master/fix-libsvn-address-conflict, 2014-08-16)
> $ git log --abbrev=8 --date=short --pretty="%h (%s, %ad)" -n1
> 5bdb1c4e (Merge pull request #245 from
> kblees/kb/master/fix-libsvn-address-conflict, 2014-08-16)
>
> But the documentation did not mention that.
>
>  Documentation/pretty-formats.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/pretty-formats.txt
> b/Documentation/pretty-formats.txt
> index 85d6353..eac7909 100644
> --- a/Documentation/pretty-formats.txt
> +++ b/Documentation/pretty-formats.txt
> @@ -122,7 +122,7 @@ The placeholders are:
>  - '%ce': committer email
>  - '%cE': committer email (respecting .mailmap, see
>    linkgit:git-shortlog[1] or linkgit:git-blame[1])
> -- '%cd': committer date
> +- '%cd': committer date (format respects --date= option)
Funny that we already have the same text for %ad.  Thanks.
>  - '%cD': committer date, RFC2822 style
>  - '%cr': committer date, relative
>  - '%ct': committer date, UNIX timestamp
Previous: Thomas Braun
Message 2 of 2 in “pretty: note that %cd respects the --date= option”
  1. 1/1 pretty: note that %cd respects the --date= optionThomas Braun, Aug 20, 2014
  2. Junio C HamanoAug 21, 2014

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.