Web lists-archives.com

Re: [PATCH] t3200-branch.sh: use "--set-upstream-to" in test




> Change deprecated "--set-upstream" branch option to
> preferred "--set-upstream-to".
> 
> Signed-off-by: Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>
> 
> ---
> 
>   i'm assuming this should use "--set-upstream-to" as do all the
> others.

I don't think so, see 52668846ea (builtin/branch: stop supporting the
"--set-upstream" option, 2017-08-17).

Though arguably the test name could be more descriptive and tell why
it should fail.

> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
> index 69ea8202f4..ef887a0b32 100755
> --- a/t/t3200-branch.sh
> +++ b/t/t3200-branch.sh
> @@ -885,8 +885,8 @@ test_expect_success 'test --unset-upstream on a particular branch' '
>  	test_must_fail git config branch.my14.merge
>  '
> 
> -test_expect_success '--set-upstream fails' '
> -    test_must_fail git branch --set-upstream origin/master
> +test_expect_success '--set-upstream-to fails' '
> +    test_must_fail git branch --set-upstream-to origin/master
>  '
> 
>  test_expect_success '--set-upstream-to notices an error to set branch as own upstream' '
> 
> -- 
> 
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                   http://crashcourse.ca/dokuwiki
> 
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>