cloning submodules with children submodules

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

 



It appears that git clone or git submodule init does not handle submodules under submodules.

Given this project tree:

modules/mod_A
modules/mod_B
modules/mod_b

proj_one/mod_A
proj_one/mod_B
proj_one/mod_B/mod_b

proj_two/mod_A
proj_two/mod_B
proj_two/mod_b

The cloning of proj_two works correctly. However, for proj_one, mod_b is not under mod_B:

cloned proj_one

$ ls -a ./
.  ..  .git  .gitmodules  mod_A  mod_B	project.txt
$ ls -a ./mod_A
.  ..
$ ls -a ./mod_B
.  ..
$ more .gitmodules
[submodule "mod_A"]
	path = mod_A
	url = /home/martinol/test/modules/mod_A/.git
[submodule "mod_B"]
	path = mod_B
	url = /home/martinol/test/modules/mod_B/.git
Submodule 'mod_A' (/home/martinol/test/modules/mod_A/.git) registered for path 'mod_A' Submodule 'mod_B' (/home/martinol/test/modules/mod_B/.git) registered for path 'mod_B' Initialized empty Git repository in /home/martinol/test/user_a/ proj_one/mod_A/.git/
0 blocks
Submodule path 'mod_A': checked out '80298817a0789d039e1fb4a73c9635fce8e7cdd2' Initialized empty Git repository in /home/martinol/test/user_a/ proj_one/mod_B/.git/
0 blocks
Submodule path 'mod_B': checked out '21b652610f5e9085f799c424d8a7ef685f5ec440'

submodule init/update proj_one

$ ls -a ./
.  ..  .git  .gitmodules  mod_A  mod_B	project.txt
$ ls -a ./mod_A
.  ..  .git  module.txt
$ ls -a ./mod_B
.  ..  .git  module.txt
$ more .gitmodules
[submodule "mod_A"]
	path = mod_A
	url = /home/martinol/test/modules/mod_A/.git
[submodule "mod_B"]
	path = mod_B
	url = /home/martinol/test/modules/mod_B/.git

public proj_one

$ cd ~/test/proj_one
$ ls -a ./
.  ..  .git  .gitmodules  mod_A  mod_B	project.txt
$ ls -a ./mod_B
.  ..  .git  .gitmodules  mod_b  module.txt
$ more .gitmodules
[submodule "mod_A"]
	path = mod_A
	url = /home/martinol/test/modules/mod_A/.git
[submodule "mod_B"]
	path = mod_B
	url = /home/martinol/test/modules/mod_B/.git
$ more mod_B/.gitmodules
[submodule "mod_b"]
	path = mod_b
	url = /home/martinol/test/modules/mod_b/.git

$ git --version
git version 1.5.3.6

I've attached a script that demonstrates this behavior.

Thanks, Paul

Attachment: sub-sub-modules.sh
Description: Binary data






[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]

  Powered by Linux