From: ZheNing Hu via GitGitGadget Date: Fri, 09 Apr 2021 13:37:41 GMT Subject: [PATCH v8 1/2] [GSOC] docs: correct descript of trailer..command Message-ID: <505903811df83cf26f4dd70c5b811dde169896a2.1617975462.git.gitgitgadget@gmail.com> In-Reply-To: From: ZheNing Hu In the original documentation of `trailer..command`, some descriptions are easily misunderstood. So let's modify it to increase its readability. In addition, clarify that `$ARG` in command can only be replaced once since `$ARG` is text replacement. Signed-off-by: ZheNing Hu --- Documentation/git-interpret-trailers.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt index 96ec6499f001..3e5aa3a65ae9 100644 --- a/Documentation/git-interpret-trailers.txt +++ b/Documentation/git-interpret-trailers.txt @@ -237,20 +237,20 @@ trailer..command:: specified . + When this option is specified, the behavior is as if a special -'=' argument were added at the beginning of the command -line, where is taken to be the standard output of the -specified command with any leading and trailing whitespace trimmed -off. +'--trailer =' argument was added at the beginning of +the "git interpret-trailers" command, where is taken to be the +standard output of the specified command with any leading and trailing +whitespace trimmed off. + -If the command contains the `$ARG` string, this string will be -replaced with the part of an existing trailer with the same -, if any, before the command is launched. +The first occurrence of substring `$ARG` will be replaced with the + part of an existing trailer with the same , if any, +before the command is launched. + If some '=' arguments are also passed on the command -line, when a 'trailer..command' is configured, the command will -also be executed for each of these arguments. And the part of -these arguments, if any, will be used to replace the `$ARG` string in -the command. +line, when a 'trailer..command' is configured, the command is run +once for each these arguments with the same . And the +part of these arguments, if any, will be used to replace the first `$ARG` +string in the command. EXAMPLES -------- -- gitgitgadget