public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah•com>
To: Junio C Hamano <gitster@pobox•com>
Cc: Daniel Barkalow <barkalow@iabervon•org>,
	Andrew Klossner <andrew@cesa•opbu.xerox.com>,
	git@vger•kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx•de>
Subject: Re: git clone stable-2.6.25.y fails over HTTP
Date: Fri, 6 Jun 2008 13:48:14 -0700	[thread overview]
Message-ID: <20080606204814.GE11209@kroah.com> (raw)
In-Reply-To: <7vzlpzzi8c.fsf@gitster.siamese.dyndns.org>

On Thu, Jun 05, 2008 at 02:26:11PM -0700, Junio C Hamano wrote:
> 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

  reply	other threads:[~2008-06-06 20:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200806041511.m54FBPL9006783@pogo.cesa.opbu.xerox.com>
2008-06-04 15:45 ` git clone stable-2.6.25.y fails over HTTP Greg KH
2008-06-04 17:09   ` Junio C Hamano
2008-06-04 18:00     ` Jakub Narebski
2008-06-04 18:02       ` Junio C Hamano
2008-06-05  4:03     ` Greg KH
2008-06-05  4:12       ` Junio C Hamano
2008-06-05  5:08         ` Greg KH
2008-06-05 20:53           ` Daniel Barkalow
2008-06-05 21:26             ` Junio C Hamano
2008-06-06 20:48               ` Greg KH [this message]
2008-06-06 21:00                 ` Junio C Hamano
2008-06-06 21:54                   ` Greg KH
2008-06-10 15:05 Andrew Klossner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080606204814.GE11209@kroah.com \
    --to=greg@kroah$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=andrew@cesa$(echo .)opbu.xerox.com \
    --cc=barkalow@iabervon$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox