{"thread":{"id":"40972","subject":"[RFC] Case insensitive URL rewrite","startedAt":"2015-12-11T13:45:37Z","lastAt":"2015-12-11T19:15:13Z","messageCount":6,"participants":["Lars Schneider","Daniel Stenberg","Junio C Hamano","Stefan Beller","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"274271","messageId":"B207EFC1-48DF-4B8F-8373-28A0CB5660B0@gmail.com","threadId":"40972","inReplyTo":null,"subject":"[RFC] Case insensitive URL rewrite","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-12-11T13:45:37Z","receivedAt":"2015-12-11T13:45:37Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"Hi,\n\nthe \"url.<someURL>.insteadOf\" git config is case sensitive. I understand that this makes sense on case sensitive file systems. However, URLs are mostly case insensitive:\n\nConsider this:\ngit clone https://GIThub.com/GIT/GIT\ngit clone https://github.com/git/git\n\nBoth commands will clone the same repository.\n\nInterestingly enough this works, too:\ngit clone git@GIThub.com:GIT/GIT\n\nWhat do you think about a flag that makes these rewrites case insensitive? E.g. with the following config flag:\n\n[url \"<actual url base>\"]\n\tinsteadOf = <other url base>\n\tignorecase = true\n\nThanks,\nLars\n"},{"id":"274274","messageId":"alpine.DEB.2.11.1512111535040.9787@tvnag.unkk.fr","threadId":"40972","inReplyTo":"B207EFC1-48DF-4B8F-8373-28A0CB5660B0@gmail.com","subject":"Re: [RFC] Case insensitive URL rewrite","fromName":"Daniel Stenberg","fromEmail":"daniel@haxx.se","sentAt":"2015-12-11T14:38:52Z","receivedAt":"2015-12-11T14:38:52Z","isPatch":false,"sender":{"key":"daniel@haxx.se","avatar":"https://gravatar.com/avatar/69fdca87edd17cee21ca2e79fc2ff671d644603c3dc27167430f3cd3dbab7ba8?d=mp&s=160"},"body":"On Fri, 11 Dec 2015, Lars Schneider wrote:\n\n> the \"url.<someURL>.insteadOf\" git config is case sensitive. I understand \n> that this makes sense on case sensitive file systems. However, URLs are \n> mostly case insensitive:\n\nMinor detail here perhaps, but...\n\nI would object to URLs being \"mostly case insensitive\", even if github \napparently seems to work that way. The path part of URLs are rarely case \ninsensitive since it tends to map to a *nix file system, while the host name \npart is insensitive as section 3.2.2 in RFC 3986 says.\n\n-- \n\n  / daniel.haxx.se\n"},{"id":"274282","messageId":"xmqq7fkkg7tq.fsf@gitster.mtv.corp.google.com","threadId":"40972","inReplyTo":"B207EFC1-48DF-4B8F-8373-28A0CB5660B0@gmail.com","subject":"Re: [RFC] Case insensitive URL rewrite","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-12-11T18:26:41Z","receivedAt":"2015-12-11T18:26:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lars Schneider <larsxschneider@gmail.com> writes:\n\n> What do you think about a flag that makes these rewrites case insensitive? E.g. with the following config flag:\n>\n> [url \"<actual url base>\"]\n> \tinsteadOf = <other url base>\n> \tignorecase = true\n\nI am with Daniel on this.\n\nIt is perfectly fine to consider these two equivalent.\n\n    git clone https://github.com/git/git (canonical one)\n    git clone https://GitHub.com/git/git (host part in funny case)\n\nIn fact, I think we should do this without any additional\nconfiguration variable.\n\nOn the other hand, these two MUST be treated as different by\ndefault:\n\n    git clone https://github.com/GIT/GIT (differences outside host part)\n    git clone git@github.com:GIT/GIT     (differences outside host part)\n\nAlthough I am OK if this is hidden behind a configuration variable,\nI am not sure how much value you would be giving to the users.\n\nIn any case, I expect that additional change (on top of what is\nrequired to make hostname part treated case insensitively) would not\nbe too bad, if we were going to fix the hostname part.\n"},{"id":"274283","messageId":"CAGZ79kZbxFT6_rZUAfUW7Qof8n7mjU53VZb24uGru4LfTfFr=w@mail.gmail.com","threadId":"40972","inReplyTo":"xmqq7fkkg7tq.fsf@gitster.mtv.corp.google.com","subject":"Re: [RFC] Case insensitive URL rewrite","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-12-11T18:51:58Z","receivedAt":"2015-12-11T18:51:58Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Fri, Dec 11, 2015 at 10:26 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> On the other hand, these two MUST be treated as different by\n> default:\n>\n>     git clone https://github.com/GIT/GIT (differences outside host part)\n>     git clone git@github.com:GIT/GIT     (differences outside host part)\n\nThis is one of the more obvious examples I would think as the protocol is\ndifferent. What about:\n\n     git clone git@example.com:git/git     (differences outside host part)\n     git clone git@example.com:GIT/GIT     (differences outside host part)\n\nIf the host has a filesystem which respects capitalization, these may be\ntwo different repositories.\n"},{"id":"274284","messageId":"xmqqzixgervd.fsf@gitster.mtv.corp.google.com","threadId":"40972","inReplyTo":"CAGZ79kZbxFT6_rZUAfUW7Qof8n7mjU53VZb24uGru4LfTfFr=w@mail.gmail.com","subject":"Re: [RFC] Case insensitive URL rewrite","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-12-11T18:56:38Z","receivedAt":"2015-12-11T18:56:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n> On Fri, Dec 11, 2015 at 10:26 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> On the other hand, these two MUST be treated as different by\n>> default:\n>>\n>>     git clone https://github.com/GIT/GIT (differences outside host part)\n>>     git clone git@github.com:GIT/GIT     (differences outside host part)\n>\n> This is one of the more obvious examples I would think as the protocol is\n> different.\n\nOh, I should have been more careful; I did not think Lars meant\ngit@GitHub.com should somehow match https://github.com but a more\nobvious \"git@github.com:GIT/GIT and git@GitHub.com:git/git behave\nthe same\", and I thought everybody who read it understood the\nexample as such.\n\n> What about:\n>\n>      git clone git@example.com:git/git     (differences outside host part)\n>      git clone git@example.com:GIT/GIT     (differences outside host part)\n>\n> If the host has a filesystem which respects capitalization, these may be\n> two different repositories.\n\nThat is what I meant.  Thanks for clarification.\n"},{"id":"274285","messageId":"20151211191512.GA5361@sigill.intra.peff.net","threadId":"40972","inReplyTo":"xmqq7fkkg7tq.fsf@gitster.mtv.corp.google.com","subject":"Re: [RFC] Case insensitive URL rewrite","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-12-11T19:15:13Z","receivedAt":"2015-12-11T19:15:13Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Dec 11, 2015 at 10:26:41AM -0800, Junio C Hamano wrote:\n\n> Lars Schneider <larsxschneider@gmail.com> writes:\n> \n> > What do you think about a flag that makes these rewrites case insensitive? E.g. with the following config flag:\n> >\n> > [url \"<actual url base>\"]\n> > \tinsteadOf = <other url base>\n> > \tignorecase = true\n> \n> I am with Daniel on this.\n> \n> It is perfectly fine to consider these two equivalent.\n> \n>     git clone https://github.com/git/git (canonical one)\n>     git clone https://GitHub.com/git/git (host part in funny case)\n> \n> In fact, I think we should do this without any additional\n> configuration variable.\n> \n> On the other hand, these two MUST be treated as different by\n> default:\n> \n>     git clone https://github.com/GIT/GIT (differences outside host part)\n>     git clone git@github.com:GIT/GIT     (differences outside host part)\n\nI haven't looked, but the code in urlmatch.c probably gets all of this\nright already. It was written much later than the insteadOf code, as it\nwas part of the http.$url.* matching, and it may be reasonable to simply\nteach the insteadOf code to use it. OTOH, it may need tweaked because\nI'm not sure how it would handle non-URLs like the \"host:path\" ssh form.\n\n-Peff\n"}]}