help: the question about relative path in the objects/info/alternates
- From
- Jason Wang <jason77.wang@gmail.com>
- Date
- Aug 1, 2011, 09:16 UTC
- Message-ID
- <4E366F08.2060808@gmail.com>
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.