Using submodules for third_party/

Jelmer Vernooij jelmer at samba.org
Sun Dec 7 09:11:03 MST 2014


On Sun, Dec 07, 2014 at 08:14:51AM +0100, Volker Lendecke wrote:
> On Sat, Dec 06, 2014 at 11:57:24PM +0000, Jelmer Vernooij wrote:
> >   This also only affects new checkouts and fetches of changes to the
> >   submodules. If the submodule reference doesn't change, there is no
> >   need for updates.
> 
> I do fresh clones pretty frequently. Is there an
> "alternates" mechanism for submodules that I can set
> globally? I'd clone the 3rdparty repos and reference them
> locally, if only for speed reasons.

You can specify '--reference <repo-url>' to 'git submodule update', which will make
it add that URL to the alternates of any submodule it checks out. You
can also just modify the alternates file for any submodule, since
they're regular repositories that live in .git/submodules.

There is no global alternates file as far as I know.

Cheers,

Jelmer


More information about the samba-technical mailing list