git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 28, 2016, 23:13 UTC
Message-ID
<xmqqmvrpl2lb.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1454012898-10138-1-git-send-email-agwheeler@gmail.com>
Andrew Wheeler <agwheeler@gmail.com> writes:
Show 34 quoted lines
> 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.
Previous: Andrew WheelerNext: Andrew Wheeler
Message 2 of 3 in “push --force-with-lease: Fix ref status reporting”
  1. push --force-with-lease: Fix ref status reportingAndrew Wheeler, Jan 28, 2016
  2. Junio C HamanoJan 28, 2016
  3. Andrew WheelerJan 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.