Re: [PATCH 14/22] test-lib functions: add --author support to test_commit
- From
Denton Liu <liu.denton@gmail.com>
- Date
- Jan 14, 2021, 07:40 UTC
- Message-ID
- <X//1iV92dlzGEoJI@generichostname>
- In-Reply-To
- <20210112201806.13284-15-avarab@gmail.com>
Hi Ævar,
On Tue, Jan 12, 2021 at 09:17:58PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> index 194b601bc0..529f6264fe 100644
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -185,6 +185,8 @@ debug () {
> # Do not call test_tick before making a commit
> # --signoff
> # Invoke "git commit" with --signoff
> +# --author=<author>The usage shows that you have to specify the author argument with an equal sign...
Show 18 quoted lines
> +# 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.
> @@ -193,6 +195,7 @@ debug () {
>
> test_commit () {
> notick= &&
> + author= &&
> signoff= &&
> indir= &&
> while test $# != 0
> @@ -201,6 +204,10 @@ test_commit () {
> --notick)
> notick=yes
> ;;
> + --author)
> + author="$2"but over here, it's only parsed if they're presented as two separate tokens. We should correct the usage text accordingly.
Thanks, Denton
Show 5 quoted lines
> + shift > + ;; > --signoff) > signoff="$1" > ;;