{"thread":{"id":"53447","subject":"Issue with commit a2b26ff \"fsck: convert gitmodules url to URL passed to curl\"","startedAt":"2020-05-11T18:02:30Z","lastAt":"2020-05-11T19:49:33Z","messageCount":2,"participants":["Arno Gourdol","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"397561","messageId":"8F92F354-BBDD-4629-98D4-A67E0A865397@gmail.com","threadId":"53447","inReplyTo":null,"subject":"Issue with commit a2b26ff \"fsck: convert gitmodules url to URL passed to curl\"","fromName":"Arno Gourdol","fromEmail":"arno.gourdol@gmail.com","sentAt":"2020-05-11T18:02:24Z","receivedAt":"2020-05-11T18:02:30Z","isPatch":false,"sender":{"key":"arno.gourdol@gmail.com","avatar":null},"body":"Hi,\n\nI have run into an issue that is preventing me from pushing commits to my GitHub repo. I believe the problem can be tracked down to this change:\n\nhttps://github.com/git/git/commit/a2b26ffb1a81aa23dd14453f4db05d8fe24ee7cc\n\nThis change introduced stricter validation and checking of the .gitmodules file.\n\nThe problem is that I had an invalid URL in my .gitmodules file (an extra \"/\" in \"http://“):\n\n```\n[submodule \"packages/website/assets/tecendil-js\"]\n    path = packages/website/assets/tecendil-js\n    url = https:///github.com/arnog/tecendil-js.git\n    branch = master\n```\n\nHowever, I cannot commit a fix to this, as it gets rejected because the current .gitmodules is invalid. As a result I can no longer push commits to my repo.\n\nAny suggestion on how to work around this?\n\n(PS: I have attempted to contact GitHub about this, but haven’t heard back)\n\nBest,\nArno.\n\n\n"},{"id":"397580","messageId":"20200511194930.GA10545@coredump.intra.peff.net","threadId":"53447","inReplyTo":"8F92F354-BBDD-4629-98D4-A67E0A865397@gmail.com","subject":"Re: Issue with commit a2b26ff \"fsck: convert gitmodules url to URL passed to curl\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-05-11T19:49:30Z","receivedAt":"2020-05-11T19:49:33Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 11, 2020 at 11:02:24AM -0700, Arno Gourdol wrote:\n\n> This change introduced stricter validation and checking of the .gitmodules file.\n> \n> The problem is that I had an invalid URL in my .gitmodules file (an extra \"/\" in \"http://“):\n> \n> ```\n> [submodule \"packages/website/assets/tecendil-js\"]\n>     path = packages/website/assets/tecendil-js\n>     url = https:///github.com/arnog/tecendil-js.git\n>     branch = master\n> ```\n\nYeah, I agree that would be blocked by the recent fsck changes you\nfound.\n\n> However, I cannot commit a fix to this, as it gets rejected because\n> the current .gitmodules is invalid. As a result I can no longer push\n> commits to my repo.\n\nWas the broken .gitmodules already pushed up? If so, then the push\nfixing it shouldn't need to send the bad object, and should be allowed.\nThough you need to make sure you aren't pushing up any intermediate\ntrees with the broken state, either (i.e., you can't push up the fix on\ntop of some other changes; the fix has to come first).\n\nIf it wasn't already pushed up, then you should be able to fix via \"git\nrebase -i\" or similar. That will rewrite history, but the history hasn't\nbeen shared with anyone else by pushing, it shouldn't be a big deal.\n\n> (PS: I have attempted to contact GitHub about this, but haven’t heard back)\n\nHopefully one of the suggestions above should lead to a resolution. But\nin the worst case they can relax the fsck restrictions temporarily to\nget a fix pushed up.\n\n-Peff\n"}]}