Re: [PATCH v3] push --force-with-lease: Fix ref status reporting

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

 



Andrew Wheeler <agwheeler@xxxxxxxxx> writes:

> diff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh
> index c402d8d..c65033f 100755
> --- a/t/t5533-push-cas.sh
> +++ b/t/t5533-push-cas.sh
> @@ -101,7 +101,8 @@ test_expect_success 'push to update (allowed, tracking)' '
>  	(
>  		cd dst &&
>  		test_commit D &&
> -		git push --force-with-lease=master origin master
> +		git push --force-with-lease=master origin master 2>err &&
> +		! grep "forced update" err
>  	) &&
>  	git ls-remote dst refs/heads/master >expect &&
>  	git ls-remote src refs/heads/master >actual &&
> @@ -114,7 +115,8 @@ test_expect_success 'push to update (allowed even though no-ff)' '
>  		cd dst &&
>  		git reset --hard HEAD^ &&
>  		test_commit D &&
> -		git push --force-with-lease=master origin master
> +		git push --force-with-lease=master origin master 2>err &&
> +		grep "forced update" err
>  	) &&
>  	git ls-remote dst refs/heads/master >expect &&
>  	git ls-remote src refs/heads/master >actual &&
> @@ -147,7 +149,8 @@ test_expect_success 'push to delete (allowed)' '
>  	setup_srcdst_basic &&
>  	(
>  		cd dst &&
> -		git push --force-with-lease=master origin :master
> +		git push --force-with-lease=master origin :master 2>err &&
> +		grep deleted err
>  	) &&
>  	>expect &&
>  	git ls-remote src refs/heads/master >actual &&

These all look OK (I am not sure about message i18n, though).

Do we not test a case where --force-with-lease push is rejected due
to REF_STATUS_REJECT_STALE?

Thanks.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]