Subject: help: the question about relative path in the objects/info/alternates

From: Jason Wang <[email-masked]>
Date: Mon, 1 Aug 2011 17:16:56 +0800

Hi git experts,

 From the objects/info/alternates part of this URL 
http://www.kernel.org/pub/software/scm/git/docs/gitrepository-layout.html, 
it says it will work if alternates has relative path in it. But i found 
it will always fail under below situation, i don't know whether the 
failure is due to the git nature or it is a git potential bug.

The failure situation is like that:
On my machine, i have a git bare base repository, e.g. 
/home/jason/source/base-bare. On the same machine, i have a git bare 
incremental (it need to refer to base repository) repository, e.g. 
/home/jason/source/incremental-bare. In the 
incremental-bare/objects/info/alternates, i set a relative path to point 
to the objects of base-bare like this "../../base-bare/objects". Then i 
want to clone a new repository from the incremental-bare on the same 
machine, if i use this command "git clone 
/home/jason/source/incremental-bare new-project", it will fail; but if i 
use this command "git clone file:///home/jason/source/incremental-bare 
new-project", it will work successfully, Why the first one can't work, 
it is a bug for git?

In addtion, if i write an absolute path in the 
incremental-bare/objects/info/alternates like this 
"/home/jason/source/base-bare/objects", it will always work well no 
matter i add or don't add "file://".

Thanks
Jason Wang.