Re: [RFC] Submodules in GIT
From: Stephan Feder <hidden>
Date: 2016-08-11 20:06:09
Andy Parkins wrote:
On Thursday 2006 November 30 11:57, sf wrote:quoted
quoted
Worse, if you allow that to happen, the supermodule can commit a state that cannot be retrieved from the submodule's repository. The ONLY thing a supermodule can record about a submodule is a commit.So what? You have a submodule commit that only exists in the supermodule. I fail to see the problem. The changes you made to the submodule _in the supermodule_ can later be pulled from wherever you want.Eh? The files aren't stored in the supermodule, they're stored in the submodule. The ONLY thing in the supermodule is the commit hash. The objects for the submodule are still /in/ the submodule.
But you have got the submodule on your local disk anyway. So just setup alternates and the supermodule contains all of the submodule.
It sounds like you're suggesting that the supermodule commit includes files from the submodule? How can that work? The two aren't separate entities then, it's just one big repository.
It works as it always works in git: The supermodule commit contains the submodule commit, the submodule commit contains the submodule files, so the supermodule contains the submodule (at least the part of the submodule that is visible). It _must_ be one repository but it need not be big (once more, use alternates).
I mean, what would this supermodule commit look like? Would it include a commit message? Which module should that commit message be about? Should the commit's parents be stored? Which parents, the submodule HEAD or the supermodule HEAD? Which tree object should it link to? The one in the submodule doesn't exist, so it'll have to be a freshly made up one for the supermodule - except now you've put submodule paths in the supermodule. Nope. That's never going to work.
Again I do not see the problem. Probably I have a much simpler picture of submodules: They are just commits in the supermodule's tree. Everything else follows naturally from how git currently behaves. Of course it works. It is simple, it is the git way. Am I missing the point? Regards Stephan -- b.i.t. beratungsgesellschaft für informations-technologie mbh Stephan Feder elisabethenstr. 62 fon: +49(0)6151/827575 64283 darmstadt fax: +49(0)6151/827576 mailto:sf@b-i-t.de www: http://www.b-i-t.de