Skip to content

Commit 289a0b2

Browse files
Linus Arvergitster
authored andcommitted
trailer --unfold help: prefer "reformat" over "join"
The phrase "join whitespace-continued values" requires some additional context. For example, "whitespace" means newlines (not just space characters), and "join" means to join only the multiple lines together for a single trailer (and not that we are joining multiple trailers together). That is, "join" means to convert token: This is a very long value, with spaces and newlines in it. to token: This is a very long value, with spaces and newlines in it. and does not mean to convert token: value1 token: value2 to token: value1 value2. Update the help text to resolve the above ambiguity. While we're add it, update the docs to use similar language as the change in the help text. Signed-off-by: Linus Arver <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb088cb commit 289a0b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/git-interpret-trailers.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ OPTIONS
155155
variables.
156156

157157
--unfold::
158-
Remove any whitespace-continuation in trailers, so that each
159-
trailer appears on a line by itself with its full content.
158+
If a trailer has a value that runs over multiple lines (aka "folded"),
159+
reformat the value into a single line.
160160

161161
--parse::
162162
A convenience alias for `--only-trailers --only-input

builtin/interpret-trailers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int cmd_interpret_trailers(int argc, const char **argv, const char *prefix)
106106

107107
OPT_BOOL(0, "only-trailers", &opts.only_trailers, N_("output only the trailers")),
108108
OPT_BOOL(0, "only-input", &opts.only_input, N_("do not apply trailer.* configuration variables")),
109-
OPT_BOOL(0, "unfold", &opts.unfold, N_("join whitespace-continued values")),
109+
OPT_BOOL(0, "unfold", &opts.unfold, N_("reformat multiline trailer values as single-line values")),
110110
OPT_CALLBACK_F(0, "parse", &opts, NULL, N_("alias for --only-trailers --only-input --unfold"),
111111
PARSE_OPT_NOARG | PARSE_OPT_NONEG, parse_opt_parse),
112112
OPT_BOOL(0, "no-divider", &opts.no_divider, N_("do not treat \"---\" as the end of input")),

0 commit comments

Comments
 (0)