From: Brian Lyles <brianmlyles@gmail.com>
To: git@vger.kernel.org
Cc: Brian Lyles <brianmlyles@gmail.com>, linusa@google.com
Subject: [PATCH v2 2/2] docs: adjust trailer `separator` and `key_value_separator` language
Date: Mon, 18 Mar 2024 00:38:02 -0500 [thread overview]
Message-ID: <20240318053848.185201-2-brianmlyles@gmail.com> (raw)
In-Reply-To: <20240316035612.752910-1-brianmlyles@gmail.com>
The language describing the trailer separator and key-value separator
default value is overly complicated.
Indicate the default with simpler "Defaults to ..." language.
Suggested-by: Linus Arver <linusa@google.com>
Signed-off-by: Brian Lyles <brianmlyles@gmail.com>
---
This commit is new in v2 per Linus' suggestion[1].
[1]: https://lore.kernel.org/git/owly1q8a4qhh.fsf@fine.c.googlers.com/
Documentation/pretty-formats.txt | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index e1788cb07a..8ee940b6a4 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -316,9 +316,8 @@ multiple times, the last occurrence wins.
`Reviewed-by`.
** 'only[=<bool>]': select whether non-trailer lines from the trailer
block should be included.
-** 'separator=<sep>': specify a separator inserted between trailer
- lines. When this option is not given each trailer line is
- terminated with a line feed character. The string <sep> may contain
+** 'separator=<sep>': specify the separator inserted between trailer
+ lines. Defaults to a line feed character. The string <sep> may contain
the literal formatting codes described above. To use comma as
separator one must use `%x2C` as it would otherwise be parsed as
next option. E.g., `%(trailers:key=Ticket,separator=%x2C )`
@@ -329,10 +328,9 @@ multiple times, the last occurrence wins.
`%(trailers:only,unfold=true)` unfolds and shows all trailer lines.
** 'keyonly[=<bool>]': only show the key part of the trailer.
** 'valueonly[=<bool>]': only show the value part of the trailer.
-** 'key_value_separator=<sep>': specify a separator inserted between
- the key and value of each trailer. When this option is not given each trailer
- key-value pair is separated by ": ". Otherwise it shares the same semantics
- as 'separator=<sep>' above.
+** 'key_value_separator=<sep>': specify the separator inserted between
+ the key and value of each trailer. Defaults to ": ". Otherwise it
+ shares the same semantics as 'separator=<sep>' above.
NOTE: Some placeholders may depend on other options given to the
revision traversal engine. For example, the `%g*` reflog options will
--
2.43.2
next prev parent reply other threads:[~2024-03-18 5:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-16 3:55 [PATCH] docs: correct trailer `key_value_separator` description Brian Lyles
2024-03-16 6:53 ` Linus Arver
2024-03-18 4:49 ` Brian Lyles
2024-03-18 6:29 ` Linus Arver
2024-03-18 16:02 ` Junio C Hamano
2024-03-18 18:15 ` Kristoffer Haugsbakk
2024-03-18 19:13 ` Junio C Hamano
2024-03-19 7:21 ` Linus Arver
2024-03-18 5:38 ` [PATCH v2 1/2] " Brian Lyles
2024-03-18 16:34 ` Junio C Hamano
2024-03-18 5:38 ` Brian Lyles [this message]
2024-03-18 6:42 ` [PATCH v2 2/2] docs: adjust trailer `separator` and `key_value_separator` language Linus Arver
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=20240318053848.185201-2-brianmlyles@gmail.com \
--to=brianmlyles@gmail.com \
--cc=git@vger.kernel.org \
--cc=linusa@google.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).