Castro icon indicating copy to clipboard operation
Castro copied to clipboard

git pull should update submodules automatically

Open maxpkatz opened this issue 4 years ago • 2 comments

After #760 and #762, we now have Microphysics and AMReX as submodules. We have chosen to commit them as static commits, so we pick a specific commit/tag and they are frozen at that level (rather than, say, tracking the development or master branches of those codes). This allows us to ensure that the codes are always at a level that we know is compatible with Castro. However, given the current setup with .gitmodules, the standard git pull does not automatically update the submodules to the latest (frozen) commit if we update it -- the user has to do git pull --recurse-submodules. It would be nice if the user didn't have to remember that option, and instead git pull did the thing we intuitively want.

maxpkatz avatar Feb 15 '20 18:02 maxpkatz

We also want the git submodules to (recursively) update after git checkout and git merge.

maxpkatz avatar Feb 15 '20 19:02 maxpkatz

Based on discussion @maxpkatz and I had, I'm thinking through the least disruptive ways to use git hooks as a way to automate some of the submodule management.

In other words: maybe git hooks can make git pull "just work" with submodules.

adam-m-jcbs avatar Feb 15 '20 20:02 adam-m-jcbs