On 10-06-08 03:12 AM, Johan Herland wrote: > > There are probably more issues that escape me now... Thanks for bringing this up! I'm also very interested in this topic. The main issue I see is that I don't always want my submodules to track (or not track) a branch. What I want changes depending on the circumstances. One aspect I really like about submodules is the ease of tagging. I can tag the super-repo, and know that whenever I checkout that tag I'll always get the corresponding versions of the submodules as they were when the tag was made. It would actually be disastrous, at least in my case, if the submodules were at the latest HEAD of some branch instead. This goes for almost any commit in the super-repo's history, not just the tagged ones: Whenever I checkout a historical committish, I want to get the submodules as they were when that commit was made. Even if I'm working at the HEAD of some branch, often that branch is based on a historical commit and I want to use the submodules as they were when that historical commit was made. All that said, I do think submodule branch tracking is useful. Quite often a development topic will change the super-repo and one or more submodules. It would be extremely helpful to do that work in a branch that spans the super-repo and (a subset of) the submodules. (In my mind this capability is one of the main benefits Google's "repo" tool has over submodules.) So, back to the issue at hand: Sometimes I want static (non-tracking) submodules, and sometimes I want dynamic (tracking) submodules. IMO, this makes Ævar's proposed configuration-based approach impractical. (Of course, I'm not looking to replicate svn's externals...) I'm not sure what the right approach is, but I have some thoughts: - Maybe "git branch" should be able to create submodule-spanning branches. - If so, then checkout, merge, pull and other branch-related commands should honor submodule-spanning branches. "checkout" in particular needs to distinguish between when it's checking out an actual branch vs. some other committish, and if the branch being checked out is submodule-spanning it should checkout the latest HEAD of that branch for the submodules as well. - It *may* be good enough to assume that matching branch names in the super-repo and the submodules are in fact submodule-spanning branches. - Automating all this is tricky. In my super-repo I almost never want to checkout the master HEAD of all my submodules. In fact, many of my submodules are big (e.g. they're different Linux kernels), and are only needed when building particular things, so that checking all of them out at once is almost always a huge waste of time. All this is probably not the kind of feedback you were hoping for! :) M. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html