Re: [PATCH] git-submodule add: Record branch name in .gitmodules
- From
Jens Lehmann <jens.lehmann@web.de>
- Date
- Oct 24, 2012, 19:10 UTC
- Message-ID
- <50883D31.6080705@web.de>
- In-Reply-To
- <508713DE.7040801@gmail.com>
Am 24.10.2012 00:02, schrieb Nahor:
Show 11 quoted lines
> On 2012-10-23 13:36, Jens Lehmann wrote: >> Am 23.10.2012 21:16, schrieb Nahor: >>> Last issue, the branch that exists in your local repository may not >>> exist in someone else's repository, either because the branch is >>> purely local, or because it has a different name on the remote repo. >> >> You'll always face this kind of problems with commits too when using >> submodules, so I don't see that as a problem here. > > Commits can't change or disappear during "normal" git operation (i.e. without using "git push -f" or "git branch -D"). > A commit also has the same id in all the clones repository so there is no issue of a different name between the local and the remote repositories.
But if you forget to push a submodule commit it won't exist in someone else's repository and so he won't be able to update the submodule after checking out a commit in the superproject that records that unpushed submodule commit.