Re: bug: git submodule add fails when .git is a symlink

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

 



On Tue, Mar 1, 2016 at 1:39 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
> On Tue, Mar 1, 2016 at 12:42 PM, Joey Hess <id@xxxxxxxxxx> wrote:
>>         git init gitdir
>>         mkdir worktree
>>         cd worktree
>>         ln -s ../gitdir/.git .git
>>         git submodule add /any/git/repo sub
>>
>>         fatal: Could not chdir to '../../../sub': No such file or directory
>>
>> Fairly sure this is a bug..
>
> Which version(s) of Git do you use?

To elaborate on that: Starting in 2.7 parts of the submodule stuff
has been rewritten in C, in 2.8 even more and there is more in flight for
 > 2.8.

However your bug is also to be found in 2.6, which doesn't contain any
recent rewrites, so it is a rather long standing bug, I would presume.

As a workaround for now:

    echo "gitdir: ../gitdir/.git" > .git

instead of the symbolic link in your example (works in 2.6 and also in
2.8.0-rc0)

Thanks,
Stefan
--
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]