Re: git-submodule path computation bug with recursive submodules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 5, 2012 at 8:09 AM, Bob Halley <halley@xxxxxxxxxxxx> wrote:
>
> The git-submodule command has problems in some cases when there is a symlink
> in the path returned by pwd.
>
> I've created a repository at http://www.play-bow.org/repos/product to
> demonstrate the issue.
>
> $ git --version
> git version 1.7.11.1.116.g8228a23
>
> I copied and built the head of the master branch today.
>
> First we need a symlink.  I discovered this problem because I had a symlink
> in / to a directory under my home directory for typing convenience.
>
> $ ls -al /bug
> lrwxr-xr-x  1 root  admin  17  5 Jul 12:26 /bug@ -> /Users/halley/bug
>
> $ cd /bug
> $ pwd
> /bug
>
> Note that pwd does not resolve the symlink (though pwd -P would on many
> platforms)
>
> $ pwd -P
> /Users/halley/bug/product
>
> $ git clone http://www.play-bow.org/repos/product
> Cloning into 'product'...
>
> I'm purposely not using 'clone --recursive' as the bug doesn't appear if you
> do that.
>
> $ cd product/
> $ ls
> file1   file2   foo/
>
> Let's get those submodules...
>
> $ git submodule update --init --recursive
> Submodule 'foo' (http://www.play-bow.org/repos/foo) registered for path 'foo'
> Cloning into 'foo'...
> Submodule path 'foo': checked out '2b02e1eb2e34961d807cfc5fc7e477e0ca844600'
> Submodule 'bar' (http://www.play-bow.org/repos/bar) registered for path 'bar'
> Cloning into 'bar'...
> fatal: Not a git repository: ../../../../Users/halley/bug/product/.git/modules/foo/modules/bar
> Failed to recurse into submodule path 'foo'
>
> The first level of submodule clones successfully, but submodule 'foo'
> contains submodule 'bar', and cloning it fails.

It fails for me too, running zsh and stock Linux.

Seems to originate here.

Commit: 69c3051780d6cacfe242563296160634dc667a90:
Author: Jens Lehmann <Jens.Lehmann@xxxxxx>
Date:   Sun Mar 4 22:15:36 2012 +0100

    submodules: refactor computation of relative gitdir path

Phil
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]