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

Re: Potential problems with url.<base>.insteadOf

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2022, 16:16 UTC
Message-ID
<xmqq35dj0yl3.fsf@gitster.g>
In-Reply-To
<CAH1-q0iPsnkypiF=2LRgXwNqE_+R0gj706FCKgqGEUum+OAhQg@mail.gmail.com>
Javier Mora <cousteaulecommandant@gmail.com> writes:
> This results in an ambiguous case, and Git does nothing to prevent it!
> The documentation says that the longest insteadOf value wins, but both
> have the same length since both are the same URL.
The longest has this case in mind:
    [url "A"] insteadof = https://example.com/
    [url "B"] insteadof = https://example.com/special/

So "A" is used as a replacement for the whole site, except for the special hierarchy that is rewritten to "B".

Getting rid of what you no longer need with "config --unset" is the right thing to do, and you did fine in the previous example.

Previous: Junio C Hamano
Message 5 of 5 in “Potential problems with url.<base>.insteadOf”
  1. Javier MoraAug 25, 2022
  2. Andreas SchwabAug 26, 2022
  3. Javier MoraAug 26, 2022
  4. Junio C HamanoAug 26, 2022
  5. Junio C HamanoAug 26, 2022

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.