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

url.<base>.insteadOf with empty value

From
Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
Date
Oct 14, 2011, 09:03 UTC
Message-ID
<54556728-92C0-4992-9831-0D582C383235@jetbrains.com>
If I don't specify any value for url.<base>.insteadOf or url.<base>.pushInsteadOf, Git substitutes all urls for remotes defined in .git/config

Probably that's because any url starts with empty string and thus has to be substituted. But it might be a bit confusing, because on the other hand if no value is given to the property insteadOf, user may expect this property to be ignored.

Please check if current Git behavior is correct. 
If it is not a bug, I'd suggest to add a note to man git-config about this.

# git version git version 1.7.6

# cat .git/config
[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*
  url = github.com/klikh/Test.git 
  pushUrl = jetbrains.com/klikh/Test.git 
[url "http://"]
  insteadOf=

# git remote -v origin http://github.com/klikh/Test.git (fetch) origin http://jetbrains.com/klikh/Test.git (push)

---------------------------------- Kirill Likhodedov JetBrains, Inc http://www.jetbrains.com "Develop with pleasure!"

Next: Junio C Hamano
Message 1 of 3 in “url.<base>.insteadOf with empty value”
  1. Kirill LikhodedovOct 14, 2011
  2. Junio C HamanoOct 14, 2011
  3. Kirill LikhodedovOct 14, 2011

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.