url.<base>.insteadOf with empty value

From: Kirill Likhodedov <hidden>
Date: 2016-06-15 22:52:15

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!"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help