Hi,

I'm sending a probe here to see if I got this right before opening an issue.

When a git project is checked out using ansible, submodules are always
updated with the '--remote' option.

https://github.com/ansible/ansible/blob/devel/library/source_control/git#L432

Here is the relevant piece of code :

if 'remote' in params:
  cmd = [ git_path, 'submodule',
          'update', '--init', '--recursive' ,
          '--remote' ]
else:
  cmd = [ git_path, 'submodule',
          'update', '--init', '--recursive' ]
(rc, out, err) = module.run_command(cmd, cwd=dest)


Note that the 'remote' in params is not related to the 'remote' git
module option : tt is automatically gathered from possible 'git
submodule' options (see
https://github.com/ansible/ansible/blob/devel/library/source_control/git#L152).

The problem with this is that git will try to update the submodule to
origin/master by default, and this is not always desirable (in my case,
I don't even have a master branch).

As far as I know, there is not way to handle this righ now, besides
setting branch.<name>.remote and submodule.<name>.branch in .gitmodules.

Can you confirm this is really an issue, or enlighten me otherwise ?

Thanks,

M
-- 
Michel Blanc
{ :github => "@leucos", :twitter => "@b9m", :gpg => "0X24B35C22" }

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/53CCE063.1090306%40mbnet.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to