Re: [PATCH] completion: loosen and document the requirement around completing alias

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>>  * We've discussed this when we reviewed the topic that just hit
>>    'master'.  Before we forget...
>>
>>  contrib/completion/git-completion.bash | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> And here is an obligatory "test" update I will squash into the main
> patch.  The new ones copy a canonical ": git <cmd> ; ..."  test and
> remove 'git' and also the space before the semicolon.
>
> diff --git c/t/t9902-completion.sh w/t/t9902-completion.sh
> index 47e20fb8b1..a7c3b4eb63 100755
> --- c/t/t9902-completion.sh
> +++ w/t/t9902-completion.sh
> @@ -2464,6 +2464,24 @@ test_expect_success 'completion used <cmd> completion for alias: !f() { : git <c
>  	EOF
>  '
>  
> +test_expect_success 'completion used <cmd> completion for alias: !f() { : <cmd> ; ... }' '
> +	test_config alias.co "!f() { : checkout ; if ... } f" &&
> +	test_completion "git co m" <<-\EOF
> +	main Z
> +	mybranch Z
> +	mytag Z
> +	EOF
> +'
> +
> +test_expect_success 'completion used <cmd> completion for alias: !f() { : <cmd>; ... }' '
> +	test_config alias.co "!f() { : checkout; if ... } f" &&
> +	test_completion "git co m" <<-\EOF
> +	main Z
> +	mybranch Z
> +	mytag Z
> +	EOF
> +'
> +
>  test_expect_success 'completion without explicit _git_xxx function' '
>  	test_completion "git version --" <<-\EOF
>  	--build-options Z

LGTM, thanks!



[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