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

Re: [RFC] Case insensitive URL rewrite

From
Jeff King <peff@peff.net>
Date
Dec 11, 2015, 19:15 UTC
Message-ID
<20151211191512.GA5361@sigill.intra.peff.net>
In-Reply-To
<xmqq7fkkg7tq.fsf@gitster.mtv.corp.google.com>
On Fri, Dec 11, 2015 at 10:26:41AM -0800, Junio C Hamano wrote:
Show 23 quoted lines
> Lars Schneider <larsxschneider@gmail.com> writes:
> 
> > What do you think about a flag that makes these rewrites case insensitive? E.g. with the following config flag:
> >
> > [url "<actual url base>"]
> > 	insteadOf = <other url base>
> > 	ignorecase = true
> 
> I am with Daniel on this.
> 
> It is perfectly fine to consider these two equivalent.
> 
>     git clone https://github.com/git/git (canonical one)
>     git clone https://GitHub.com/git/git (host part in funny case)
> 
> In fact, I think we should do this without any additional
> configuration variable.
> 
> On the other hand, these two MUST be treated as different by
> default:
> 
>     git clone https://github.com/GIT/GIT (differences outside host part)
>     git clone git@github.com:GIT/GIT     (differences outside host part)

I haven't looked, but the code in urlmatch.c probably gets all of this right already. It was written much later than the insteadOf code, as it was part of the http.$url.* matching, and it may be reasonable to simply teach the insteadOf code to use it. OTOH, it may need tweaked because I'm not sure how it would handle non-URLs like the "host:path" ssh form.

-Peff
Previous: Junio C Hamano
Message 6 of 6 in “[RFC] Case insensitive URL rewrite”
  1. Lars SchneiderDec 11, 2015
  2. Daniel StenbergDec 11, 2015
  3. Junio C HamanoDec 11, 2015
  4. Stefan BellerDec 11, 2015
  5. Junio C HamanoDec 11, 2015
  6. Jeff KingDec 11, 2015

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.