Re: [PATCH 3/3] git-submodule: add "sync" command
- From
Mark Levedahl <mlevedahl@gmail.com>
- Date
- Aug 24, 2008, 21:29 UTC
- Message-ID
- <48B1D2CC.7000200@gmail.com>
- In-Reply-To
- <7vwsi6meas.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 9 quoted lines
> I am not sure about the way you determine $remote. When the HEAD in the > submodule repository is detached by prior "git submodule update", this > will fall back to the default "origin" --- is it a good behaviour? > > This is not an objection; I am merely wondering if that fallback is > sensible, or if people who are interested in submodules can suggest better > alternatives. > >
I think it makes sense to split submodules into two categories, name them what you will, but the discernible difference is whether they are defined using relative or absolute urls.
1) relative url - this should *always* fetch / pull from a url relative to the superproject's url. Overriding not possible (except by recording an absolute url). The idea is these submodules are closely related to the superproject, and the use of a relative url is a positive declaration that "I will maintain this 'forest' of git trees as a unit". 2) absolute url - use .gitmodules entry as the initial hint, allow overrides in .git/config, such a submodule is maintained separately.
If we could reach some such agreement as above, we might begin to make some progress on what role the porcelain has in maintaining a 'forest' of git projects as a superproject and submodules.
Mark