{"thread":{"id":"50965","subject":"[PATCH] t5516: fix mismerge in 'next'","startedAt":"2019-04-22T04:48:16Z","lastAt":"2019-04-22T06:25:43Z","messageCount":2,"participants":["Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"374216","messageId":"20190422044812.GA28493@sigill.intra.peff.net","threadId":"50965","inReplyTo":null,"subject":"[PATCH] t5516: fix mismerge in 'next'","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-04-22T04:48:12Z","receivedAt":"2019-04-22T04:48:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The merge of jk/fetch-reachability-error-fix conflicts with\njt/test-protocol-version, but the conflict resolution done by\nb4ce8375c018 has a typo (looks like an editor mistake):\n\n  $ git show b4ce8375c018\n  [...]\n   -                      test_must_fail git fetch ../testrepo/.git $SHA1_3 &&\n   -                      test_must_fail git fetch ../testrepo/.git $SHA1_1 &&\n   +                      # Some protocol versions (e.g. 2) support fetching\n   +                      # unadvertised objects, so restrict this test to v0.\n  -                       test_must_fail ok=sigpipe env GIT_TEST_PROTOCOL_VERSION= \\\n  -                               git fetch ../testrepo/.git $SHA1_3 &&\n  -                       test_must_fail ok=sigpipe env GIT_TEST_PROTOCOL_VERSION= \\\n  ++                      test_must_fail env GIT_TEST_PROTOCOL_VERSION= \\\n  ++                              git fetepo/.git $SHA1_3 &&\n  ++                      test_must_fail env GIT_TEST_PROTOCOL_VERSION= \\\n   +                              git fetch ../testrepo/.git $SHA1_1 &&\n\nThe tests don't notice the bogus command because we expect the command\nto fail.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nThe same problem is present in the merges to pu, which is not surprising\nsince the 'next' merge was probably just resolved by rerere. We'd\npresumably want a fixup like this for 'next' until the next rewind, but\nthe more important thing is to adjust the rerere cache so the eventual\nmerge to 'master' is correct.\n\n t/t5516-fetch-push.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 09e7178987..c81ca360ac 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -1242,7 +1242,7 @@ do\n \t\t\t# Some protocol versions (e.g. 2) support fetching\n \t\t\t# unadvertised objects, so restrict this test to v0.\n \t\t\ttest_must_fail env GIT_TEST_PROTOCOL_VERSION= \\\n-\t\t\t\tgit fetepo/.git $SHA1_3 &&\n+\t\t\t\tgit fetch ../testrepo/.git $SHA1_3 &&\n \t\t\ttest_must_fail env GIT_TEST_PROTOCOL_VERSION= \\\n \t\t\t\tgit fetch ../testrepo/.git $SHA1_1 &&\n \t\t\tgit --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&\n-- \n2.21.0.1179.g65a7c4fda7\n"},{"id":"374227","messageId":"xmqq4l6q8skd.fsf@gitster-ct.c.googlers.com","threadId":"50965","inReplyTo":"20190422044812.GA28493@sigill.intra.peff.net","subject":"Re: [PATCH] t5516: fix mismerge in 'next'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-22T06:25:38Z","receivedAt":"2019-04-22T06:25:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The merge of jk/fetch-reachability-error-fix conflicts with\n> jt/test-protocol-version, but the conflict resolution done by\n> b4ce8375c018 has a typo (looks like an editor mistake):\n> ...\n\nIndeed it was.  Thanks for spotting.\n\n> The same problem is present in the merges to pu, which is not surprising\n> since the 'next' merge was probably just resolved by rerere.\n\nYup, here is what I did:\n\n    $ git checkout b4ce8375c018\n    $ git am jk-t5516-fix.patch\n    $ CG=$(git describe)\n    $ git reset --hard b4ce8375c018^\n    $ git merge jk/fetch-reachability-error-fix\n    $ git rerere forget t/t5516-fetch-push.sh\n    $ git diff $CG ;# shows the typo\n    $ git checkout $CG t/t5516-fetch-push.sh\n    # I should learn to use 'git restore' one of these days.\n    $ git diff ;# shows --cc\n    $ git rerere\n    $ git reset --hard\n    $ git merge jk/fetch-reachability-error-fix\n    $ git diff $CG ;# shows no difference\n\nThat should teach rerere about the right resolution.  And to carry\nthe fix in 'next':\n\n    $ git checkout next\n    $ git am -s3 jk-t5516-fix.patch\n\nThanks.\n"}]}