How to iintialize git sub sub modules

746 views
Skip to first unread message

Gabriel Petrovay

unread,
Nov 5, 2011, 6:57:51 AM11/5/11
to msysGit
In the git-bash command line running

git submodule update --init --recursive

fails at the first sub-sub-module reporting the absence of a weird
relative-absolute path.

Take for example cloud9. This has as submodule support/ace which also
has submodules doc/wiki, support/cockpit, support/dryice, support/
pilot

And this happens when you run the above command in cloud9 repository:

$ git submodule update --init --recursive support/ace
Submodule 'support/ace' () registered for path 'support/ace'
Submodule 'doc/wiki' (https://github.com/ajaxorg/ace.git) registered
for path 'doc/wiki'
Submodule 'support/cockpit' (https://github.com/ajaxorg/ace.git)
registered for path 'support/cockpit'
Submodule 'support/dryice' (https://github.com/ajaxorg/ace.git)
registered for path 'support/dryice'
Submodule 'support/pilot' (https://github.com/ajaxorg/ace.git)
registered for path 'support/pilot'
fatal: Not a git repository: ../../c:/cloud9/source/.git/modules/
support/ace/modules/doc/wiki
Unable to fetch in submodule path 'doc/wiki'
Failed to recurse into submodule path 'support/ace'

What is wrong here in the configuration of msysgit or the submodules?
I would go and do a manual recursive init-update but git does not
allow that. Trying the same command in a submodule git says: "You need
to run this command from the toplevel of the working tree."


Thanks!

Gabriel

chbr...@gmail.com

unread,
Feb 24, 2012, 9:02:25 AM2/24/12
to msy...@googlegroups.com
I have the exact same problem, reported on Git mailing list (http://article.gmane.org/gmane.comp.version-control.git/191425) before I realized it was related to msysGit.

The commands from Windows' CMD, but it fails when run in MinGW shell, so I think that the problem is related to the fact that since 1.7.8 (not sure) the submodule git-dir is "symlinked" to superproject's git-dir with an absolute path. This path, saved in .git file of submodule directory, has window-style path, which I believe gives trouble to git.

I'm not a git hacker, nor msysgit hacker, but it looks like msysgit has trouble to work with path indicated in .git file, and it has to do with windows path vs. unix path.

What do you think?

Charles

Sebastian Schuberth

unread,
Feb 24, 2012, 11:52:29 AM2/24/12
to Gabriel Petrovay, msysGit
On 05.11.2011 11:57, Gabriel Petrovay wrote:

> In the git-bash command line running
>
> git submodule update --init --recursive
>
> fails at the first sub-sub-module reporting the absence of a weird
> relative-absolute path.

See to work fine for me, but I'm seeing less submodules than you:

$ git --version
git version 1.7.9.msysgit.0

$ git clone git://github.com/ajaxorg/cloud9.git
Cloning into 'cloud9'...
remote: Counting objects: 32628, done.
remote: Compressing objects: 100% (10695/10695), done.
remote: Total 32628 (delta 20999), reused 32158 (delta 20626)
Receiving objects: 100% (32628/32628), 63.00 MiB | 550 KiB/s, done.
Resolving deltas: 100% (20999/20999), done.

$ cd cloud9/

$ git submodule update --init --recursive support/ace

Submodule 'support/ace' (https://github.com/ajaxorg/ace.git) registered for path
'support/ace'
Cloning into 'support/ace'...
remote: Counting objects: 21812, done.
remote: Compressing objects: 100% (5879/5879), done.
remote: Total 21812 (delta 15750), reused 20308 (delta 14411)
Receiving objects: 100% (21812/21812), 8.08 MiB | 130 KiB/s, done.
Resolving deltas: 100% (15750/15750), done.
Submodule path 'support/ace': checked out '21a07bd793185cf5ddf840e7aff73ead30a03
ed2'
Submodule 'doc/wiki' (git://github.com/ajaxorg/ace.wiki.git) registered for path
'doc/wiki'
Cloning into 'doc/wiki'...
remote: Counting objects: 168, done.
remote: Compressing objects: 100% (164/164), done.
remote: Total 168 (delta 92), reused 4 (delta 2)Receiving objects: 14% (24/168)
Receiving objects: 16% (27/168)
Receiving objects: 100% (168/168), 24.37 KiB, done.
Resolving deltas: 100% (92/92), done.
Submodule path 'doc/wiki': checked out 'd2a65d0addc2e5ab922bbff9cb6022a4652b4f13
'

--
Sebastian Schuberth

Jens Lehmann

unread,
Feb 24, 2012, 3:54:33 PM2/24/12
to chbr...@gmail.com, msy...@googlegroups.com
Am 24.02.2012 15:02, schrieb chbr...@gmail.com:
> The commands from Windows' CMD, but it fails when run in MinGW shell, so I think that the problem is related to the fact that since 1.7.8 (not sure) the submodule git-dir is "symlinked" to superproject's git-dir with an absolute path.

That's right.

> This path, saved in .git file of submodule directory, has window-style path, which I believe gives trouble to git.

As I have no Windows Git installation at hand right now, could you please
post that path?

> I'm not a git hacker, nor msysgit hacker, but it looks like msysgit has trouble to work with path indicated in .git file, and it has to do with windows path vs. unix path.
>
> What do you think?

You might be right about that. And as I was involved in that gitfile
change and currently am working on making those absolute paths relative
(to make superprojects movable again) I'm definitely interested in what
is going here.

chbr...@gmail.com

unread,
Feb 25, 2012, 10:01:32 AM2/25/12
to msy...@googlegroups.com, chbr...@gmail.com
Le vendredi 24 février 2012 21:54:33 UTC+1, JLehmann a écrit :

> Am 24.02.2012 15:02, schrieb chbr...@gmail.com:
>> This path, saved in .git file of submodule directory, has window-style path,
>> which I believe gives trouble to git.

> As I have no Windows Git installation at hand right now, could you please
> post that path?

.git file of submodule ext/fiji has following content:
gitdir: G:/repo.git/.git/modules/ext/fiji

Superproject is G:/repo.git

Hope this helps,

Charles

Jens Lehmann

unread,
Feb 26, 2012, 3:04:33 PM2/26/12
to chbr...@gmail.com, msy...@googlegroups.com
Am 25.02.2012 16:01, schrieb chbr...@gmail.com:
> Le vendredi 24 f�vrier 2012 21:54:33 UTC+1, JLehmann a �crit :

>
>> Am 24.02.2012 15:02, schrieb chbr...@gmail.com <mailto:chbr...@gmail.com>:
>>> This path, saved in .git file of submodule directory, has window-style path,
>>> which I believe gives trouble to git.
>
>> As I have no Windows Git installation at hand right now, could you please
>> post that path?
>
> .git file of submodule ext/fiji has following content:
> gitdir: G:/repo.git/.git/modules/ext/fiji
>
> Superproject is G:/repo.git
>
> Hope this helps,

Thanks, that looks just like the issue Johannes Sixt posted on the git
mailing list today:
http://permalink.gmane.org/gmane.comp.version-control.git/191568

freddie....@scorm.com

unread,
Nov 1, 2013, 12:32:29 PM11/1/13
to msy...@googlegroups.com, gabipe...@gmail.com
I still see this issue in mysysgit 1.8.4, FWIW. The git thread made it seem as though there was a possible resolution, but I'm having a hard time determining whether a patch landed in core git and what target version might see a final resolution for mysysgit.

Michael Geddes

unread,
Nov 11, 2013, 12:44:43 AM11/11/13
to msy...@googlegroups.com, chbr...@gmail.com
I think this might be respond to the same fix with something else I'm
experiencing in the git tests - which is that there are issues with the code
that finds the shortest path and how it responds to drives.

There's a branch 'jx/relative-path-regression-fix' on gitster's fork on
github.

My only issue is that introduces the use of a static char to return a result -
which seems to me a bad thing for thread safety.

//.

Heiko Voigt

unread,
Nov 11, 2013, 4:09:45 PM11/11/13
to freddie....@scorm.com, msy...@googlegroups.com, gabipe...@gmail.com
Hi,

Am 01.11.2013 17:32, schrieb freddie....@scorm.com:
> I still see this issue in mysysgit 1.8.4, FWIW. The git thread made it
> seem as though there was a possible resolution, but I'm having a hard
> time determining whether a patch landed in core git and what target
> version might see a final resolution for mysysgit.

AFAIR all fixes regarding this should be in mainline, but I might be
mistakens.

I can not seem to reproduce this since the mentioned repository seems to
not have any submodule at all:

https://github.com/ajaxorg/cloud9/

Could you give a reference (or even better a sequence of commands
creating everything necessary) that allows us to reproduce the issue?

Cheers Heiko


> On Saturday, November 5, 2011 5:57:51 AM UTC-5, Gabriel Petrovay wrote:
>
> In the git-bash command line running
>
> git submodule update --init --recursive
>
> fails at the first sub-sub-module reporting the absence of a weird
> relative-absolute path.
>
> Take for example cloud9. This has as submodule support/ace which also
> has submodules doc/wiki, support/cockpit, support/dryice, support/
> pilot
>
> And this happens when you run the above command in cloud9 repository:
>
> $ git submodule update --init --recursive support/ace
> Submodule 'support/ace' () registered for path 'support/ace'
> Submodule 'doc/wiki' (https://github.com/ajaxorg/ace.git
> <https://github.com/ajaxorg/ace.git>) registered
> for path 'doc/wiki'
> Submodule 'support/cockpit' (https://github.com/ajaxorg/ace.git
> <https://github.com/ajaxorg/ace.git>)
> registered for path 'support/cockpit'
> Submodule 'support/dryice' (https://github.com/ajaxorg/ace.git
> <https://github.com/ajaxorg/ace.git>)
> registered for path 'support/dryice'
> Submodule 'support/pilot' (https://github.com/ajaxorg/ace.git
> <https://github.com/ajaxorg/ace.git>)
Reply all
Reply to author
Forward
0 new messages