git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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*
Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 6 in “Use nonrelative paths instead of absolute paths for cloned repositories”
  1. Use nonrelative paths instead of absolute paths for cloned repositoriesDaniel Barkalow, Jun 6, 2008
  2. Johannes SchindelinJun 6, 2008
  3. Daniel BarkalowJun 6, 2008
  4. Junio C HamanoJun 6, 2008
  5. Johannes SchindelinJun 6, 2008
  6. Junio C HamanoJun 6, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.