True. But if you need the changes to the submodule for your supermodule
to function, and upstream either does not want to merge your changes or
the merge will be available only after a long time, then what is the
alternative? You must be able to keep local changes, and you must be
able to keep pulling from upstream. Of course, what you describe is the
ideal case: You find a bug, push the fix upstream, and in no time at all
your fix is merged and you can just pull a new version into your
superproject, but that might be wishful thinking.
No! All you need is a naming scheme to address the commit of the
subproject that should be pulled. The extreme case would be to just
address it with its id (well, currently you cannot do that with git
pull, but that is fixable). But I already proposed a syntax for naming
commits which are "hidden" in a superproject: Just name the path as
described in git-rev-parse and append double slashes (to indicate that
you mean the commit, not the tree it contains). So no manual work needs
be done by upstream.
[snipped: about independence of submodule branches]
[transmeta example snipped]
If you want to track some chosen submodules there are two easy solutions:
1. If you want to track their state as it appears from the supermodule's
view, pull from master:<submodule>//
2. If you want to track their state from their own development branches,
pull from <submodule>/master
Can you see the difference?
Every commit is a git tree in its own right, is it not?
[description of independent submodule development snipped]
I am not sure I understand what you say.
1. If you are working on a submodule, then the supermodule never enters
the picture. You are working independently. So far, so good.
2. If you are working on the supermodule, git will not be able to
function? How would you work without submodules, in which case you would
have simply one large project?
I totally agree. When I try to explain why submodules work that only
exist as part of one or more supermodules, I do not mean to say that you
cannot or should not have independent branches or repositories for the
submodules' code.
I took that for granted: from a commit you only ever look backwards (in
time/history dimension) or downwards (in content dimension).
Regards
Stephan
-
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