Re: [PATCH] push: avoid showing false negotiation errors
From: Junio C Hamano <hidden>
Date: 2024-07-02 21:52:02
Jeff King [off-list ref] writes:
quoted
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.