git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Date in git-commit output inconsistent with log.date format
@ 2022-05-16 12:42 Damien Regad
  2022-05-16 16:14 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Damien Regad @ 2022-05-16 12:42 UTC (permalink / raw)
  To: git

I was amending a commit message, and noticed the date in the output is
printed in 'default' format, as shown below:

$ git commit --amend --no-edit
[x bf63ada92] Test commit
 Date: Mon May 16 14:25:57 2022 +0200
 1 file changed, 32 insertions(+)
 create mode 100644 test.txt

Since I have set log.date=iso, I was expecting the date to use the
format defined in that configuration. Is it intentional that the
default format is applied instead ?

Thanks
Damien


PS: Apologies if this has been asked before, I did search the list
archive without finding anything relevant.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Date in git-commit output inconsistent with log.date format
  2022-05-16 12:42 Date in git-commit output inconsistent with log.date format Damien Regad
@ 2022-05-16 16:14 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2022-05-16 16:14 UTC (permalink / raw)
  To: Damien Regad; +Cc: git

Damien Regad <dregad@mantisbt.org> writes:

> I was amending a commit message, and noticed the date in the output is
> printed in 'default' format, as shown below:
>
> $ git commit --amend --no-edit
> [x bf63ada92] Test commit
>  Date: Mon May 16 14:25:57 2022 +0200
>  1 file changed, 32 insertions(+)
>  create mode 100644 test.txt
>
> Since I have set log.date=iso, I was expecting the date to use the
> Is it intentional that the
> default format is applied instead ?

Yes.

That output is from "git commit", and is not from any command in the
"git log" family.  Besides, it way predates the introduction of
log.date configuration variable.

This could be a XY problem.  Can you tell us why you care?  What
motivates you to see that date (and optionally Author when the
author is different from the current user) output in a specific
format---it is meant for human consumption so "I run 'git commit' in
a script and scrape its output" would not be it.

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-16 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 12:42 Date in git-commit output inconsistent with log.date format Damien Regad
2022-05-16 16:14 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).