From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: "Rafael Dulfer" <rafael@dulfer.be>, "Jeff King" <peff@peff.net>,
"Andrei Rybak" <rybak.a.v@gmail.com>,
"Rafael Dulfer" <rafael.dulfer@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2] rev-list: clarify git-log default date format
Date: Wed, 15 Feb 2023 16:42:25 -0800 [thread overview]
Message-ID: <xmqqcz6av3ta.fsf_-_@gitster.g> (raw)
In-Reply-To: <xmqqsffouhys.fsf@gitster.g> (Junio C. Hamano's message of "Thu, 02 Feb 2023 08:53:31 -0800")
The documentation mistakenly said that the default format was
similar to RFC 2822 format and tried to specify it by enumerating
differences, which had two problems:
* There are some more differences from the 2822 format that are not
mentioned; worse yet
* The default format is not modeled after RFC 2822 format at all.
As can be seen in f80cd783 (date.c: add "show_date()" function.,
2005-05-06), it is a derivative of ctime(3) format.
Stop saying that it is similar to RFC 2822, and rewrite the
description to explain the format without requiring the reader to
know any other format.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* The discussion stalled and the topic was left in limbo for a few
weeks. Let's attempt to reboot it instead of silently waiting
for a rerolled version from the original author.
Documentation/rev-list-options.txt | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index ff68e48406..9ae7ccdaa9 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -1100,12 +1100,11 @@ preferred format. See the `strftime` manual for a complete list of
format placeholders. When using `-local`, the correct syntax is
`--date=format-local:...`.
-`--date=default` is the default format, and is similar to
-`--date=rfc2822`, with a few exceptions:
---
- - there is no comma after the day-of-week
-
- - the time zone is omitted when the local time zone is used
+`--date=default` is the default format, and is based on ctime(3)
+output. It shows a single line with three-letter day of the week,
+three-letter month, day-of-month, hour-minute-seconds in "HH:MM:SS"
+format, followed by 4-digit year, plus timezone information, unless
+the local time zone is used, e.g. `Thu Jan 1 00:00:00 1970 +0000`.
ifdef::git-rev-list[]
--header::
--
2.39.2-456-gb1485644f9
next prev parent reply other threads:[~2023-02-16 0:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 15:57 [PATCH] rev-list: clarify git-log default date format Rafael Dulfer
2023-02-01 18:19 ` Junio C Hamano
2023-02-01 22:28 ` Ævar Arnfjörð Bjarmason
2023-02-01 22:58 ` Junio C Hamano
2023-02-02 11:37 ` Rafael Dulfer
2023-02-02 16:17 ` Junio C Hamano
2023-02-02 16:53 ` Junio C Hamano
2023-02-16 0:42 ` Junio C Hamano [this message]
2023-02-16 2:15 ` [PATCH v2] " Jeff King
2023-02-16 2:58 ` Junio C Hamano
2023-02-16 16:29 ` [PATCH v3] " Junio C Hamano
2023-02-16 17:24 ` Jeff King
2023-02-01 22:47 ` [PATCH] " Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqcz6av3ta.fsf_-_@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=rafael.dulfer@gmail.com \
--cc=rafael@dulfer.be \
--cc=rybak.a.v@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).