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

Re: [PATCH] push: avoid showing false negotiation errors

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 2, 2024, 21:51 UTC
Message-ID
<xmqqcynvqx6r.fsf@gitster.g>
In-Reply-To
<20240702211151.GA120950@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
>> diff --git c/t/t5516-fetch-push.sh w/t/t5516-fetch-push.sh
>> index 2e7c0e1648..a3f18404d9 100755
>> --- c/t/t5516-fetch-push.sh
>> +++ w/t/t5516-fetch-push.sh
>> @@ -230,6 +230,17 @@ test_expect_success 'push with negotiation proceeds anyway even if negotiation f
>>  	test_grep "push negotiation failed" err
>>  '
>>  
>> +test_expect_success 'push deletion with negotiation' '
>> +	mk_empty testrepo &&
>> +	git push testrepo $the_first_commit:refs/heads/master &&
>> +	git ls-remote testrepo >ls-remote &&
>> +	git -c push.negotiate=1 push testrepo \
>> +		:master $the_first_commit:refs/heads/next 2>errors-2 &&
>> +	test_grep ! "negotiate-only needs one or " errors-2 &&
>> +	git -c push.negotiate=1 push testrepo :next 2>errors-1 &&
>> +	test_grep ! "negotiate-only needs one or " errors-1
>> +'
>
> The test mostly makes sense, though is the ls-remote bit leftover
> debugging cruft?

The ls-remote is more of "forward-looking" (as opposed to "leftover") debugging cruft to help future debugging when somebody breaks the tests. I can remove it, of course, as it is not required for the tests to work correctly.

Thanks.
Previous: Jeff King
Message 3 of 3 in “push: avoid showing false negotiation errors”
  1. push: avoid showing false negotiation errorsJunio C Hamano, Jul 2, 2024
  2. Jeff KingJul 2, 2024
  3. Junio C HamanoJul 2, 2024

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.