From cb85ed1eb4df9b0ae3f2020a6c1036cd493c5284 Mon Sep 17 00:00:00 2001 From: Brian Lyles Date: Mon, 18 Mar 2024 00:38:01 -0500 Subject: [PATCH 1/2] docs: correct trailer `key_value_separator` description The description for `key_value_separator` incorrectly states that this separator is inserted between trailer lines, which appears likely to have been incorrectly copied from `separator` when this option was added. Update the description to correctly indicate that it is a separator that appears between the key and the value of each trailer. Signed-off-by: Brian Lyles Acked-by: Linus Arver Signed-off-by: Junio C Hamano --- Documentation/pretty-formats.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 23f6335887..6f0d3daa4d 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -302,8 +302,8 @@ option is given with no value, it's enabled. ** 'keyonly[=]': only show the key part of the trailer. ** 'valueonly[=]': only show the value part of the trailer. ** 'key_value_separator=': specify a separator inserted between - trailer lines. When this option is not given each trailer key-value - pair is separated by ": ". Otherwise it shares the same semantics + 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=' above. NOTE: Some placeholders may depend on other options given to the From bff85a338cfd15b0574f7366b81199d27b19505e Mon Sep 17 00:00:00 2001 From: Brian Lyles Date: Mon, 18 Mar 2024 00:38:02 -0500 Subject: [PATCH 2/2] docs: adjust trailer `separator` and `key_value_separator` language 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 Signed-off-by: Brian Lyles Acked-by: Linus Arver Signed-off-by: Junio C Hamano --- 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 6f0d3daa4d..51024a8c23 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -288,9 +288,8 @@ option is given with no value, it's enabled. `Reviewed-by`. ** 'only[=]': select whether non-trailer lines from the trailer block should be included. -** 'separator=': 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 may contain +** 'separator=': specify the separator inserted between trailer + lines. Defaults to a line feed character. The string 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 )` @@ -301,10 +300,9 @@ option is given with no value, it's enabled. `%(trailers:only,unfold=true)` unfolds and shows all trailer lines. ** 'keyonly[=]': only show the key part of the trailer. ** 'valueonly[=]': only show the value part of the trailer. -** 'key_value_separator=': 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=' above. +** 'key_value_separator=': specify the separator inserted between + the key and value of each trailer. Defaults to ": ". Otherwise it + shares the same semantics as 'separator=' above. NOTE: Some placeholders may depend on other options given to the revision traversal engine. For example, the `%g*` reflog options will