Re: [PATCH v3 2/8] builtin/verify-tag: stop using `the_repository`

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

 



Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> writes:

> When `-h` is passed to the command outside a Git repository, the
> `run_builtin()` will call the `cmd_verify_tag()` function with `repo` set
> to NULL and then early in the function, `parse_options()` call will give
> the options help and exit.

Makes sense.

> diff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh
> index 6f526c37c2..2c147072c1 100755
> --- a/t/t7030-verify-tag.sh
> +++ b/t/t7030-verify-tag.sh
> @@ -7,6 +7,13 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>  . ./test-lib.sh
>  . "$TEST_DIRECTORY/lib-gpg.sh"
>  
> +test_expect_success GPG 'verify-tag does not crash with -h' '
> +	test_expect_code 129 git verify-tag -h >usage &&
> +	test_grep "[Uu]sage: git verify-tag " usage &&
> +	test_expect_code 129 nongit git verify-tag -h >usage &&
> +	test_grep "[Uu]sage: git verify-tag " usage
> +'

OK.  I am not sure if we want to insist that the "-h" invocation
exits with status 129, but changing it would be totaly outside the
topic.

Will queue.




[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