diff options
author | addshore <adamshorland@gmail.com> | 2014-01-20 00:54:53 +0100 |
---|---|---|
committer | Michael DeHaan <michael@ansible.com> | 2014-03-28 13:01:39 -0400 |
commit | 11895fa43734ce246a7bf64746df618540251c1f (patch) | |
tree | 1df67165bd9087bbf86162a444a8a0b3a6391692 /library | |
parent | 7f7297f9ca2c1cfc394cc927ecedc89b3fcfa9b3 (diff) | |
download | ansible-11895fa43734ce246a7bf64746df618540251c1f.tar.gz |
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.
Diffstat (limited to 'library')
-rw-r--r-- | library/source_control/git | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/source_control/git b/library/source_control/git index 29dd8489f6..8acd817b8e 100644 --- a/library/source_control/git +++ b/library/source_control/git @@ -376,8 +376,8 @@ def submodule_update(git_path, module, dest): return (0, '', '') cmd = [ git_path, 'submodule', 'sync' ] (rc, out, err) = module.run_command(cmd, check_rc=True, cwd=dest) - cmd = [ git_path, 'submodule', 'update', '--init', '--recursive' ] - (rc, out, err) = module.run_command(cmd, cwd=dest) + cmd = [ git_path, 'submodule', 'update', '--init', '--recursive' ,'--remote' ] + (rc, out, err) = module.run_command(cmd) if rc != 0: module.fail_json(msg="Failed to init/update submodules") return (rc, out, err) |