On Wed, 4 Jun 2008, Greg KH wrote: > On Wed, Jun 04, 2008 at 09:12:42PM -0700, Junio C Hamano wrote: > > Greg KH <greg@xxxxxxxxx> writes: > > > > > On Wed, Jun 04, 2008 at 10:09:02AM -0700, Junio C Hamano wrote: > > > > > >> A quick fix is obviously to remove the extra prefix but it makes me wonder > > >> how these two "stable" repositories were prepared differently. Could this > > >> be a regression in "git clone"? Or perhaps you "clone -s"'s Linus's > > >> repository slightly differently between them? > > > > > > That's odd. > > > > > > Chris was the one that created the .24 tree and I created the .25 tree, > > > so we must have done so differently, sorry. > > > > No need to be sorry. Thanks for raising the issue up. > > > > I think I have one possible explanation. When "git clone" was rewritten > > in C some time ago, it started to dereference symlinks, and newer git > > would dereference /pub -> /home/ftp/pub when you do: > > > > git clone -s --bare /pub/scm/linux/kernel/git/torvalds/linux-2.6/ linux-2.6.2x.y > > > > while the scripted version used to keep /pub/scm path. > > > > A bit further digging is necessary to make sure if we can fix this easily, > > but I suspect this is worth fixing. > > 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? -Daniel *This .sig left intentionally blank* -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html