3

Given a Git repository with several submodules.
Is there a way to enforce all clients (read clones) of that repository to use the --recurse-submodules=on-demand option on pushing commits? I don't want to have the users manually add that flag to each git push.

Beside that, I will also set up an update hook on the server to enforce this policy, but that alone would make the users have to enter --recurse-submodules=on-demand each time they push commits.

Torbjörn
  • 5,512
  • 7
  • 46
  • 73

1 Answers1

2

Not yet: the config "push.recurseSubmodules" proposed in that patch didn't make it through.
Even if it had, that would mean each user need to configure his/her clone.

The only other solution is to define an alias (as in "git - default push to --recurse-submodules=check").
Again, this is a per-user solution (no easy way to propagate that setting from one central repo to all its clone).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the link to that patch. We'll probably take the alias route and annoy all group members to have that configured ;) – Torbjörn Jan 29 '13 at 07:31