This has theoretical problems: it's going to be practically impossible, in
most cases, to write a commit message that describes changes in three
submodules (which are sometimes used in the context of a different
supermodule) as well as the supermodule.
On the other hand, the supermodule commit is the one that's relevant in
the context of the supermodule, and that commit's message should describe
the set of changes as a whole.
I think it should be possible and sufficient to have "git commit" able to
recursively start a "git commit" in submodules (where you'd write a
separate message suitable for exposure to other supermodules), so you'd
have to write 4 messages but only type one command line.
This should work. Of course, if other people have made changes to parts of
the supermodule that you haven't checked out, your supermodule index will
reflect those changes, so that supermodule commits you make aren't
reverting or removing those submodules. But you won't fetch the contents
of those submodules, and won't have them checked out. (Note, however,
that, if you pull from two places, each of which has changed the same
submodule you don't have in a different way, you'll get a conflict you
can't resolve without getting the submodule yourself or getting somebody
else to merge them; git won't let you make commits which leave the
submodule merge for somebody who cares)
I don't think this aspect has been worked out too carefully. I think the
branch is made only in the supermodule, but the submodules are attached to
the supermodule's index, rather than particularly using branches, and so,
when the supermodule switches branches, the submodules should all follow,
regardless of whether they have explicit branches.
AFAIK, supermodules haven't gotten heavy enough use to work out all of the
details of what should happen when the user does different things. I think
it's all doable, but you may have to convince people to actually do it,
and I don't think everything yet works the way you'd want.
-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html