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

Re: git clone stable-2.6.25.y fails over HTTP

From
Greg KH <greg@kroah.com>
Date
Jun 6, 2008, 20:48 UTC
Message-ID
<20080606204814.GE11209@kroah.com>
In-Reply-To
<7vzlpzzi8c.fsf@gitster.siamese.dyndns.org>
On Thu, Jun 05, 2008 at 02:26:11PM -0700, Junio C Hamano wrote:
Show 27 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
> > On Wed, 4 Jun 2008, Greg KH wrote:
> > ...
> >> I can duplicate what I did, and it did it again:
> >> 	on master.kernel.org:
> >> 	$ cd /pub/scm/linux/kernel/git/stable/
> >> 	$ git clone -s --bare ../torvalds/linux-2.6.git/ test
> >> 	$ cat test/objects/info/alternates
> >> 	/home/ftp/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects
> >> 
> >> I'm guessing this is because /pub/ is a symlink:
> >> 	$ ls -l /pub
> >> 	lrwxrwxrwx 1 root root 13 Feb  4  2006 /pub -> /home/ftp/pub
> >
> > We're using getcwd() to make the absolute path, but it looks like we 
> > should check whether $PWD is set and names the same directory, and, if so, 
> > base on that instead.
> >
> > Actually, make_absolute_path() seems to go to an awful lot of trouble to 
> > make sure that there aren't symlinks in the resulting path. Is this 
> > actually necessary or even desireable for some reason? Should clone be 
> > just pasting $PWD (or, failing that, getcwd()) and the given path, and 
> > using that to identify the repo to clone?
> 
> I am not 100% sympathetic if ../torvalds/linux-2.6.git/ was what caused
> this.  Perhaps 30% or so ;-).

I agree, if I did something stupid like this, that's my fault. I didn't realize that it was stupid, so I guess a simple warning, "don't use relative paths when cloning with alternates" would have told me so.

> However, I think /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/ would
> result in the same breakage, and that is something I consider gravely
> broken.

Yeah, especially as I never realized that /pub/ was a symlink in the first place :)

thanks,
greg k-h
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 12 in “Re: git clone stable-2.6.25.y fails over HTTP”
  1. Greg KHJun 4, 2008
  2. Junio C HamanoJun 4, 2008
  3. Jakub NarebskiJun 4, 2008
  4. Junio C HamanoJun 4, 2008
  5. Greg KHJun 5, 2008
  6. Junio C HamanoJun 5, 2008
  7. Greg KHJun 5, 2008
  8. Daniel BarkalowJun 5, 2008
  9. Junio C HamanoJun 5, 2008
  10. Greg KHJun 6, 2008
  11. Junio C HamanoJun 6, 2008
  12. Greg KHJun 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.