When switching branches with git checkout I would assume that most of the time you would want to update your submodules.
- In what situation do you not want to update submodules after switching?
- What would break if this was done automatically by git checkout?
Updated with example:
- Branch A has submodule S at 3852f1
- Branch B has submodule S at fd72d7
On branch A, git checkout B will result in a working copy of branch B with submodule S at 3852f1 (with a modified S). git submodule update will checkout S at fd72d7.