Andrey Semashev
On Monday 09 December 2013 19:29:59 Alexander Lamaison wrote:
Vladimir Prus
writes: On 09.12.2013 21:17, Alexander Lamaison wrote:
Because, if so, that's not possible with git. Branches are just nicknames for particular commits. They can come and go pretty much as they please without disrupting other things. Submodules reference a _commit_ and the commits remain in the repository regardless of what happens to the branches.
Then what does 'git gc' do?
Good point. I forgot about this. So, in general, the referenced submodule needs to include the commit in _some_ branch for the superproject to definitely reference a valid commit.
However, I think the discussion was about a commit already merged to the submodule's master branch, so gc won't touch it.
Not necessarily. In my example a boost release (i.e. a tagged commit to the superproject's master) references a commit in a submodule branch that is neither develop nor master. That branch may never be merged to develop or master.
You mean a special branch quickly made to revert a specific thing before a superproject release but not part of the submodule's mainline development (i.e. develop)? Surely those commits would be merged into the submodule master? After all, they form part of a release, both for the submodule and the superproject. Alex -- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)