git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] submodule+shallow clone feature request
@ 2010-02-10 21:39 Schuyler Duveen
  2010-02-10 22:10 ` Avery Pennarun
  2010-02-10 22:14 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Schuyler Duveen @ 2010-02-10 21:39 UTC (permalink / raw)
  To: git

My use case is deploying from a git repository, which would be even more
graceful with the following features:

1. When 'git clone' has both --recursive and --depth, then submodules
are also checked out shallow (for speed/bandwidth).

2. Some way to specify an override on .gitmodules sources.  This is
because our .gitmodules includes public, read-only sources (github),
rather than our local repos we would prefer to deploy from (for the
purpose of reliability).

The other use-case for feature #2 is the read-only vs. writable
repository sources.  Developers that are also working on the submodules
should be able to clone from separate repository sources.  Though this
could be (and perhaps is) satisfied with a pushurl= in .gitmodules, I'd
like to keep the push url non-public, and that still would leave us
unable to deploy from different urls.

For #2 maybe something like this:

$ git clone --recursive --depth 1 --modules foo.modules\
> git@example.com/foo.git
where foo.modules contains:
<begin>
[submodule "bar"]
	path = bar
	url = git@example.com/bar.git
[submodule "bar/baz"]
	path = bar/baz
	url = git@example.com/baz.git
<end>

Notice how the .gitmodules needs to be able to specify recursive sources
as well.  Presumably `git submodule init` would take --modules argument
as well (and maybe git submodule update, too).

I'm not well-versed in the git source code yet, but poking around
suggests that this is doable.  Would a patch be well received (or does
someone want to do it for me :-)

cheers,
sky

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-02-11  6:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 21:39 [RFC] submodule+shallow clone feature request Schuyler Duveen
2010-02-10 22:10 ` Avery Pennarun
2010-02-10 22:14 ` Junio C Hamano
2010-02-10 22:57   ` Johannes Schindelin
2010-02-10 23:09     ` Junio C Hamano
2010-02-10 23:59       ` Johannes Schindelin
2010-02-11  6:19         ` Re* " Junio C Hamano
2010-02-11  6:51           ` Peter Hutterer

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).