Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:41

Daniel Barkalow [off-list ref] writes:
On Wed, 4 Jun 2008, Greg KH wrote:
...
quoted
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 ;-).

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.

If both are fixed by rethinking the make_absolute_path(), that would be
good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help