# url.<base>.insteadOf bugs

2 messages from 2008-04-11 to 2008-04-11. Participants: Eric Blake, Daniel Barkalow.
Thread: https://gitlist.dev/t/13064

## Eric Blake, 2008-04-11 13:59

Subject: url.<base>.insteadOf bugs
Message-ID: <loom.20080411T134849-798@post.gmane.org>
URL: https://gitlist.dev/e/loom.20080411T134849-798%40post.gmane.org

```
I just upgraded to git 1.5.5, and decided to try out the new 
url.<base>.insteadOf config option, to save me typing when pulling from 
git.sv.gnu.org (and so that I can type the same url whether I'm at home and can 
use git://, or when I'm at work and behind a stupid firewall where I must use 
http://).  It has a couple of bugs:

First, it appears to have an off-by-one bug.

$ git --version
git version 1.5.5
$ mkdir bison
$ cd bison
$ git init
Initialized empty Git repository in .git/
$ git config url.http://git.sv.gnu.org/r/.insteadOf gnu:
$ git fetch gnu:bison.git master
fatal: I don't handle protocol 'ttp'
$ git config --unset url.http://git.sv.gnu.org/r/.insteadOf     
$ git config --global 'url. http://git.sv.gnu.org/r/.insteadOf' gnu:
$ git fetch gnu:bison.git master
Getting alternates list for http://git.sv.gnu.org/r/bison.git
...

Second, 'git clone --help' documents that it uses this config option, but it 
doesn't:

$ cd ..
$ rm -Rf bison
$ git clone gnu:bison.git
Initialized empty Git repository in /home/eblake/bison/.git/
ssh: Could not resolve hostname gnu: no address associated with name
fatal: The remote end hung up unexpectedly
fetch-pack from 'gnu:bison.git' failed.

-- 
Eric Blake

```

## Daniel Barkalow, 2008-04-11 20:31

Subject: Re: url.<base>.insteadOf bugs
Message-ID: <alpine.LNX.1.00.0804111626210.19665@iabervon.org>
URL: https://gitlist.dev/e/alpine.LNX.1.00.0804111626210.19665%40iabervon.org
In-Reply-To: <loom.20080411T134849-798@post.gmane.org>

```
On Fri, 11 Apr 2008, Eric Blake wrote:

> I just upgraded to git 1.5.5, and decided to try out the new 
> url.<base>.insteadOf config option, to save me typing when pulling from 
> git.sv.gnu.org (and so that I can type the same url whether I'm at home and can 
> use git://, or when I'm at work and behind a stupid firewall where I must use 
> http://).  It has a couple of bugs:
> 
> First, it appears to have an off-by-one bug.
> 
> $ git --version
> git version 1.5.5
> $ mkdir bison
> $ cd bison
> $ git init
> Initialized empty Git repository in .git/
> $ git config url.http://git.sv.gnu.org/r/.insteadOf gnu:
> $ git fetch gnu:bison.git master
> fatal: I don't handle protocol 'ttp'
> $ git config --unset url.http://git.sv.gnu.org/r/.insteadOf     
> $ git config --global 'url. http://git.sv.gnu.org/r/.insteadOf' gnu:
> $ git fetch gnu:bison.git master
> Getting alternates list for http://git.sv.gnu.org/r/bison.git
> ...

That's weird; I'll check it out. Beats me how I managed to get an 
off-by-one error on that end of the string.

> Second, 'git clone --help' documents that it uses this config option, but it 
> doesn't:
> 
> $ cd ..
> $ rm -Rf bison
> $ git clone gnu:bison.git
> Initialized empty Git repository in /home/eblake/bison/.git/
> ssh: Could not resolve hostname gnu: no address associated with name
> fatal: The remote end hung up unexpectedly
> fetch-pack from 'gnu:bison.git' failed.

The documentation is a bit overly optimistic here. The C version of clone 
will support it, but we're currently still using the shell version which 
is the last thing (AFAIK) using the old shell parsing.

	-Daniel
*This .sig left intentionally blank*

```
