diff mbox series

Documentation: fix typos describing date format

Message ID pull.1716.git.1712911876943.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 5da40be8d7156f37b5d01071bfcb6c0abafbb8e2
Headers show
Series Documentation: fix typos describing date format | expand

Commit Message

Xing Xin April 12, 2024, 8:51 a.m. UTC
From: Xing Xin <xingxin.xx@bytedance.com>

This commit corrects a typographical error found in both
date-formats.txt and git-fast-import.txt documentation, where the term
`email format` was mistakenly used instead of `date format`.

Signed-off-by: Xing Xin <xingxin.xx@bytedance.com>
---
    Documentation: fix typos describing date format

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1716%2Fblanet%2Fxx%2Fdocumentation-typofix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1716/blanet/xx/documentation-typofix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1716

 Documentation/date-formats.txt    | 2 +-
 Documentation/git-fast-import.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


base-commit: 436d4e5b14df49870a897f64fe92c0ddc7017e4c

Comments

Junio C Hamano April 12, 2024, 4:02 p.m. UTC | #1
"blanet via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Xing Xin <xingxin.xx@bytedance.com>
>
> This commit corrects a typographical error found in both
> date-formats.txt and git-fast-import.txt documentation, where the term
> `email format` was mistakenly used instead of `date format`.

Saying "date" is much more correct than "email" ;-).  Thanks for
noticing both instances.

>  Documentation/date-formats.txt    | 2 +-
>  Documentation/git-fast-import.txt | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt
> index 67645cae64f..e24517c496f 100644
> --- a/Documentation/date-formats.txt
> +++ b/Documentation/date-formats.txt
> @@ -11,7 +11,7 @@ Git internal format::
>  	For example CET (which is 1 hour ahead of UTC) is `+0100`.
>  
>  RFC 2822::
> -	The standard email format as described by RFC 2822, for example
> +	The standard date format as described by RFC 2822, for example
>  	`Thu, 07 Apr 2005 22:13:13 +0200`.

RFC 2822 defines it as "date-time" (and this hasn't been updated by
RFC 5322).  "date" is used to specifically mean "day month year".

    https://www.rfc-editor.org/rfc/rfc2822.html#section-3.3

    date-time       =       [ day-of-week "," ] date FWS time [CFWS]
    day-of-week     =       ([FWS] day-name) / obs-day-of-week
    day-name        =       "Mon" / "Tue" / "Wed" / "Thu" /
                            "Fri" / "Sat" / "Sun"
    date            =       day month year

So the new phrasing may get complain from pedants.  Saying "The
standard date-time format as described by RFC 2822" is more
technically correct, but I actually wonder if we should go in the
opposite, looser direction, like

	The timestamp format used by RFC 2822, for example
	...

so that we do not even pretend to use the wording they use in the
RFC documents.  Doing so makes it in line with "git rev-list --help"
which says

	"--date=rfc" shows timestamps in RFC 2822 format, often
        found in e-mail messages.

But that's minor.  "date" is fine as-is.  The same comment applies
to the other hunk.

Thanks.

> diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
> index b2607366b91..0ccede255ea 100644
> --- a/Documentation/git-fast-import.txt
> +++ b/Documentation/git-fast-import.txt
> @@ -303,7 +303,7 @@ and some sanity checks on the numeric values may also be performed.
>  	with e.g. bogus timezone values.
>  
>  `rfc2822`::
> -	This is the standard email format as described by RFC 2822.
> +	This is the standard date format as described by RFC 2822.
>  +
>  An example value is ``Tue Feb 6 11:22:18 2007 -0500''.  The Git
>  parser is accurate, but a little on the lenient side.  It is the
>
> base-commit: 436d4e5b14df49870a897f64fe92c0ddc7017e4c
diff mbox series

Patch

diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt
index 67645cae64f..e24517c496f 100644
--- a/Documentation/date-formats.txt
+++ b/Documentation/date-formats.txt
@@ -11,7 +11,7 @@  Git internal format::
 	For example CET (which is 1 hour ahead of UTC) is `+0100`.
 
 RFC 2822::
-	The standard email format as described by RFC 2822, for example
+	The standard date format as described by RFC 2822, for example
 	`Thu, 07 Apr 2005 22:13:13 +0200`.
 
 ISO 8601::
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index b2607366b91..0ccede255ea 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -303,7 +303,7 @@  and some sanity checks on the numeric values may also be performed.
 	with e.g. bogus timezone values.
 
 `rfc2822`::
-	This is the standard email format as described by RFC 2822.
+	This is the standard date format as described by RFC 2822.
 +
 An example value is ``Tue Feb 6 11:22:18 2007 -0500''.  The Git
 parser is accurate, but a little on the lenient side.  It is the