Re: [PATCH 1/2] test-lib-functions.sh: fix usage for test_commit()
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jan 15, 2021, 00:19 UTC
- Message-ID
- <87wnwf3vd5.fsf@evledraar.gmail.com>
- In-Reply-To
- <e9add5f066cb0209ff9f6a0ef71584b54afd04d7.1610665323.git.liu.denton@gmail.com>
On Fri, Jan 15 2021, Denton Liu wrote:
Show 7 quoted lines
> The usage comment for test_commit() shows that the --author option > should be given as `--author=<author>`. However, this is incorrect as it > only works when given as `--author <author>`. Correct this erroneous > text. > > Also, for the sake of correctness, fix the description as well since we > invoke `git commit` with `--author <author>`, not `--author=<author>`.
LGTM. Thanks for fixing this.
FWIW I was planning to make it just support --author=*, the test_commit_bulk() function just below that does that, I think I copied its doc template, but then used test_commit's existing pattern for options parsing.
But this works just as well, and is easier :)
Show 21 quoted lines
>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
> t/test-lib-functions.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> index b0a5d74dc7..cea73cb8f0 100644
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -188,8 +188,8 @@ debug () {
> # "<file>"
> # --signoff
> # Invoke "git commit" with --signoff
> -# --author=<author>
> -# Invoke "git commit" with --author=<author>
> +# --author <author>
> +# Invoke "git commit" with --author <author>
> #
> # This will commit a file with the given contents and the given commit
> # message, and tag the resulting commit with the given tag name.