git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Maxwell Bernstein <tekk.nolagi@gmail.com>,
	Jonathan Tan <jonathantanmy@google.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Christian Couder <christian.couder@gmail.com>
Subject: [PATCH] Documentation: clarify whitespace rules for trailers
Date: Tue, 23 Aug 2022 16:06:30 +0200	[thread overview]
Message-ID: <20220823140630.159718-1-christian.couder@gmail.com> (raw)
In-Reply-To: <CAP8UFD2kMXHxvg1tKVNLhY0Gweq2YrD7+tHmZXKwguYzRQ1Qpg@mail.gmail.com>

Commit e4319562bc (trailer: be stricter in parsing separators, 2016-11-02)
restricted whitespaces allowed by `git interpret-trailers` in the "token"
part of the trailers it reads. This commit didn't update the related
documentation in Documentation/git-interpret-trailers.txt though.

Also commit 60ef86a162 (trailer: support values folded to multiple lines,
2016-10-21) updated the documentation, but didn't make it clear how many
whitespace characters are allowed at the beginning of new lines in folded
values.

Let's fix both of these issues by rewriting the paragraph describing
what whitespaces are allowed by `git interpret-trailers` in the trailers
it reads.
---
 Documentation/git-interpret-trailers.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt
index 956a01d184..0e125d795b 100644
--- a/Documentation/git-interpret-trailers.txt
+++ b/Documentation/git-interpret-trailers.txt
@@ -60,10 +60,12 @@ non-whitespace lines before a line that starts with '---' (followed by a
 space or the end of the line). Such three minus signs start the patch
 part of the message. See also `--no-divider` below.
 
-When reading trailers, there can be whitespaces after the
-token, the separator and the value. There can also be whitespaces
-inside the token and the value. The value may be split over multiple lines with
-each subsequent line starting with whitespace, like the "folding" in RFC 822.
+When reading trailers, there can be no whitespace inside the token,
+and only one regular space or tab character between the token and the
+separator. There can be whitespaces before, inside or after the
+value. The value may be split over multiple lines with each subsequent
+line starting with at least one whitespace, like the "folding" in RFC
+822.
 
 Note that 'trailers' do not follow and are not intended to follow many
 rules for RFC 822 headers. For example they do not follow
-- 
2.37.0


  parent reply	other threads:[~2022-08-23 17:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18  7:06 [PATCH] trailer: allow spaces in tokens Max Bernstein via GitGitGadget
2022-08-18  7:54 ` [PATCH v2] " Max Bernstein via GitGitGadget
2022-08-18 16:54   ` Junio C Hamano
2022-08-18 17:56     ` Jonathan Tan
2022-08-18 19:03     ` Maxwell Bernstein
2022-08-18 20:46       ` Christian Couder
2022-08-18 21:31         ` Junio C Hamano
2022-08-19  4:33           ` Junio C Hamano
2022-08-19 10:29             ` Christian Couder
2022-08-22 13:58               ` Johannes Schindelin
2022-08-23 14:06               ` Christian Couder [this message]
2022-08-24 18:13                 ` [PATCH] Documentation: clarify whitespace rules for trailers Junio C Hamano
2022-08-25 11:59                   ` Christian Couder
2022-08-25 16:20                     ` Junio C Hamano
2022-08-30 10:50                     ` [PATCH v2] " Christian Couder
2022-08-30 17:20                       ` Junio C Hamano
2022-08-18 16:48 ` [PATCH] trailer: allow spaces in tokens Junio C Hamano
2022-08-18 17:52   ` Jonathan Tan
2022-08-18 17:58     ` Junio C Hamano

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=20220823140630.159718-1-christian.couder@gmail.com \
    --to=christian.couder@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonathantanmy@google.com \
    --cc=tekk.nolagi@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 NNTP newsgroup(s).