Merge pull request #3448 from SimonSapin/mach-update-submodules

Have mach update (not just init) submodules as needed. Fix #3447
This commit is contained in:
Simon Sapin 2014-09-22 01:09:03 +01:00
commit 9af2df2540

View file

@ -79,7 +79,7 @@ class CommandBase(object):
submodules = subprocess.check_output(["git", "submodule", "status"])
for line in submodules.split('\n'):
components = line.strip().split(' ')
if len(components) > 1 and components[0].startswith('-'):
if len(components) > 1 and components[0].startswith(('-', '+')):
module_path = components[1]
subprocess.check_call(["git", "submodule", "update",
"--init", "--recursive", "--", module_path])