Add --remote to git submodule_update
This simply adds --remote to the git submodule update command. This means that if a branch is defined in .gitmodules then we should track said branch when updating.
This commit is contained in:
parent
7f7297f9ca
commit
11895fa437
1 changed files with 2 additions and 2 deletions
|
@ -376,8 +376,8 @@ def submodule_update(git_path, module, dest):
|
||||||
return (0, '', '')
|
return (0, '', '')
|
||||||
cmd = [ git_path, 'submodule', 'sync' ]
|
cmd = [ git_path, 'submodule', 'sync' ]
|
||||||
(rc, out, err) = module.run_command(cmd, check_rc=True, cwd=dest)
|
(rc, out, err) = module.run_command(cmd, check_rc=True, cwd=dest)
|
||||||
cmd = [ git_path, 'submodule', 'update', '--init', '--recursive' ]
|
cmd = [ git_path, 'submodule', 'update', '--init', '--recursive' ,'--remote' ]
|
||||||
(rc, out, err) = module.run_command(cmd, cwd=dest)
|
(rc, out, err) = module.run_command(cmd)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(msg="Failed to init/update submodules")
|
module.fail_json(msg="Failed to init/update submodules")
|
||||||
return (rc, out, err)
|
return (rc, out, err)
|
||||||
|
|
Loading…
Reference in a new issue