4 from subprocess
import check_call
6 from helpers
import GitWrapper
10 config
= git
.get_config()
11 submodules
= git
.get_submodules()
12 # Update existing submodules, but don't check out new ones
14 if not 'submodule.%s.url' % p
in config
:
16 if not path
.exists(path
.join(p
, '.git')):
18 check_call('git submodule update'.split() + [p
])
20 check_call('git submodule update --init'.split())
21 git
.foreach_submodule(cmd
)