Re: [PATCH] Use nonrelative paths instead of absolute paths for cloned repositories
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Jun 6, 2008, 03:47 UTC
- Message-ID
- <alpine.LNX.1.00.0806052327160.19665@iabervon.org>
- In-Reply-To
- <alpine.DEB.1.00.0806060422310.21190@racer>
On Fri, 6 Jun 2008, Johannes Schindelin wrote:
Show 11 quoted lines
> Hi, > > On Thu, 5 Jun 2008, Daniel Barkalow wrote: > > > Particularly for the "alternates" file, if one will be created, we want > > a path that doesn't depend on the current directory, but we want to > > retain any symlinks in the path as given and any in the user's view of > > the current directory when the path was given. > > I have to say that I do not follow why the symlinks should be trusted any > more than the absolute paths.
It's not so much a case of trusting symlinks more, but trusting the version of the path that the user used more.
This came up because kernel.org has HTTP service arranged such that /pub/... is served at http://kernel.org/pub/..., but /pub is a symlink to /home/ftp/pub/, and http://kernel.org/home/ftp/pub/... doesn't work. Clever people like Greg use "git clone -s /pub/.../linux-2.6.git" in order to share Linus's object storage, and this generated an HTTP-clonable repo with git-clone.sh, because it didn't expand symlinks, but the builtin version, without this patch, would expand them into the thing that doesn't work.
If there's a difference between using the symlink and using the thing it links to, probably the user picked the right thing, or wouldn't be too surprised that git doesn't come up with something better.
-Daniel *This .sig left intentionally blank*