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

Re: [PATCH] push: do not use potentially ambiguous default refspec

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2016, 21:10 UTC
Message-ID
<xmqqk2corzq5.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161031203834.dfavyjzkob2goa5n@hurricane>
Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:
Show 7 quoted lines
> On Fri, Oct 28, 2016 at 12:25:30PM -0700, Junio C Hamano wrote:
>
>>  * It is appreciated if somebody with spare cycles can add a test or
>>    two for this in t/t5523-push-upstream.sh or somewhere nearby.
>
> 5523 is for push --set-upstream-to, 5528 seemed more appropriate. Here's
> something squashable that fails before your patch and succeeds after.
Thanks.
Show 30 quoted lines
>
>>8----
> Subject: [PATCH] push: test pushing ambiguously named branches
>
> Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
> ---
>  t/t5528-push-default.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh
> index 73f4bb6..ac103ce 100755
> --- a/t/t5528-push-default.sh
> +++ b/t/t5528-push-default.sh
> @@ -98,6 +98,16 @@ test_expect_success 'push from/to new branch with upstream, matching and simple'
>  	test_push_failure upstream
>  '
>  
> +test_expect_success 'push ambiguously named branch with upstream, matching and simple' '
> +	git checkout -b ambiguous &&
> +	test_config branch.ambiguous.remote parent1 &&
> +	test_config branch.ambiguous.merge refs/heads/ambiguous &&
> +	git tag ambiguous &&
> +	test_push_success simple ambiguous &&
> +	test_push_success matching ambiguous &&
> +	test_push_success upstream ambiguous
> +'
> +
>  test_expect_success 'push from/to new branch with current creates remote branch' '
>  	test_config branch.new-branch.remote repo1 &&
>  	git checkout new-branch &&
Previous: Dennis Kaarsemaker
Message 3 of 3 in “push: do not use potentially ambiguous default refspec”
  1. push: do not use potentially ambiguous default refspecJunio C Hamano, Oct 28, 2016
  2. Dennis KaarsemakerOct 31, 2016
  3. Junio C HamanoOct 31, 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.