From: Junio C Hamano Date: Thu, 05 Jun 2008 21:26:11 GMT Subject: Re: git clone stable-2.6.25.y fails over HTTP Message-ID: <7vzlpzzi8c.fsf@gitster.siamese.dyndns.org> In-Reply-To: Daniel Barkalow 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 ;-). 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.