From: Jens Lehmann <Jens.Lehmann@web.de>
To: Lars Schneider <larsxschneider@gmail.com>, git@vger.kernel.org
Subject: Re: Selectively clone Git submodules -- a useful feature?
Date: Fri, 19 Jun 2015 21:08:34 +0200 [thread overview]
Message-ID: <558468B2.2010307@web.de> (raw)
In-Reply-To: <162A5ADF-1FDD-432B-B5F8-672DF5B50EEC@gmail.com>
Am 18.06.2015 um 22:55 schrieb Lars Schneider:
> AFAIK Git has two ways to clone a repository with respect to submodules:
>
> (1) Plain clone of just the repository itself:
> git clone git://github.com/foo/bar.git
>
> (2) Recursive clone of the repository including all its submodules:
> git clone --recursive git://github.com/foo/bar.git
>
> I am working on a big cross platform project and on certain platforms I don't
> need certain submodules. AFAIK there is no way to selectively clone only a
> subset of the submodules with the standard command line interface. I wonder
> if something like an exclude pattern for submodules would be of general interest.
> I imagine a call like this after a plain "clone" operation:
>
> git submodule update --init --recursive --exclude 3rdParty/Windows/*
Git already supports that use case: Just set the "submodule.<name>.update"
configuration to "none" for all submodules you aren't interested in and
"git submodule update" will always skip them.
You can also set this config option globally:
git config --global submodule.<name>.update=none
That'll set the default for all repositories of the logged in user on this
computer to not update submodule <name>.
> or even:
>
> git clone --recursive --exclude 3rdParty/Windows/* git://github.com/foo/bar.git
git clone will be influenced by the global setting. If you just want to
skip submodule <name> for a single clone you can do it like this:
git -c submodule.<name>.update=none clone --recursive git://github.com/foo/bar.git
next prev parent reply other threads:[~2015-06-19 19:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 20:55 Selectively clone Git submodules -- a useful feature? Lars Schneider
2015-06-19 19:08 ` Jens Lehmann [this message]
2016-03-16 20:47 ` Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558468B2.2010307@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).