[RFC] Fourth round of support for cloning submodules
- From
- skimo@liacs.nl <skimo@liacs.nl>
- Date
- May 23, 2007, 22:22 UTC
- Message-ID
- <11799589913153-git-send-email-skimo@liacs.nl>
From: Sven Verdoolaege <skimo@kotnet.org>
This patch series implements a mechanism for cloning submodules. Each submodule is specified by a 'submodule.<submodule>.url' configuration option, e.g.,
bash-3.00$ ./git-config --remote=http://www.liacs.nl/~sverdool/isa.git --get-regexp 'submodule\..*\.url' submodule.cloog.url /home/sverdool/public_html/cloog.git submodule.cloog.url http://www.liacs.nl/~sverdool/cloog.git
git-checkout will use the first url that works. E.g., a
git clone --submodules ssh://liacs/~/public_html/isa.git
followed by
git checkout origin/submodule
(which only works for me), will use the first url, while a
git clone --submodules http://www.liacs.nl/~sverdool/isa.git
followed by
git checkout origin/submodule
will use the second.
The cloning of submodules is handled inside git-checkout.
git-checkout will now also checkout/fetch any submodule than is present (i.e., the corresponding subdirectory has a .git) irrespective of the --submodules option.
A forced checkout of the submodule directory, i.e.,
git checkout submodule
will (clone and) checkout the submodule.
Note that this is still WIP, so there is no need to remind me that I still need to write documentation and tests.
skimo