Skip to content

pr-913/adlternative/trailer-pass-ARG-env-v11

In https://lore.kernel.org/git/xmqqv99i4ck2.fsf@gitster.g/ Junio and
Christian talked about the problem of using strbuf_replace() to replace
$ARG:

 1. if the user's script has more than one $ARG, only the first one will be
    replaced, which is incorrected.
 2. $ARG is textually replaced without shell syntax, which may result a
    broken command when $ARG include some unmatching single quote, very
    unsafe.

Now pass trailer value as $1 to the trailer command with another
trailer.<token>.cmd config, to solve these above problems.

We are now writing documents that are more readable and correct than before.

ZheNing Hu (2):
  [GSOC] docs: correct description of .command
  [GSOC] trailer: add new .cmd config option

 Documentation/git-interpret-trailers.txt | 111 ++++++++++++++++++---
 t/t7513-interpret-trailers.sh            | 122 +++++++++++++++++++++++
 trailer.c                                |  79 ++++++++++++---
 3 files changed, 280 insertions(+), 32 deletions(-)

base-commit: 142430338477d9d1bb25be66267225fb58498d92

Submitted-As: https://lore.kernel.org/git/pull.913.v11.git.1618672417.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.git.1616511182942.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v2.git.1616600555906.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v3.git.1616673200809.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v4.git.1616775185562.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v5.git.1617185147.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v6.git.1617369973328.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v7.git.1617541912381.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v8.git.1617975462.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v9.git.1618245568.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.913.v10.git.1618562875.gitgitgadget@gmail.com
Assets 2