Re: [PATCH 14/22] test-lib functions: add --author support to test_commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ævar,

On Tue, Jan 12, 2021 at 09:17:58PM +0100, Ævar Arnfjörð Bjarmason wrote:
> 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...

> +#	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

> +			shift
> +			;;
>  		--signoff)
>  			signoff="$1"
>  			;;



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux