On Wed, 2016-10-26 at 19:03 -0700, Stefan Beller wrote: > On Wed, Oct 26, 2016 at 6:52 PM, Matt McCutchen <matt@xxxxxxxxxxxxxxxxx> wrote: > > 4. I pushed several dangling submodule pointers before I learned I > > could set push.recurseSubmodules = check. This isn't the default; each > > developer has to do it manually. (In theory, I could put such things > > in a setup script for them to run if they trust me.) > > There is a current series in flight/for review that makes "check" default. > (It is blocked as check has some performance issues when having lots > of commits to be pushed, so it may take a while and not show up in the > next release) Great! One other thing: IIRC, "check" does not distinguish between different remotes. For example, suppose I fork a project that already has a submodule and I have a pair of repositories that pull from the "upstream" repositories and push to "origin" repositories for my project. Suppose I upgrade to a new upstream version and find that I'm (temporarily) able to use the upstream submodule without modifications. The "check" feature won't stop me from pushing a pointer into the "origin" superproject that points to a commit that exists in the "upstream" subproject but not the "origin" subproject. > > 5. Stashing changes to both the superproject and the subproject takes > > more steps. > > True, so you'd want to have a `git stash --recurse-submodules={yes,no}` > where the command line option is configurable, so you don't have to type > it all the time? Sounds good. I'm sure you realize this is not just a matter of running "git stash" in each submodule because there are many ways the stash stacks could get out of lockstep. The submodule content needs to be incorporated into the superproject stash. > Thanks for pointing out the issues though. they align to what > we plan on doing for submodules, so ... the plan actually makes > sense :) Again, I'm thrilled you're working on this, even if I don't use it on my current project. Matt