Re: [PATCH/RFC] submodule: add ability to shallowly clone any branch in a submodule
- From
Jens Lehmann <jens.lehmann@web.de>
- Date
- Sep 13, 2014, 11:11 UTC
- Message-ID
- <5414264F.1000909@web.de>
- In-Reply-To
- <20140912052123.GN10182@paksenarrion.iveqy.com>
Am 12.09.2014 um 07:21 schrieb Fredrik Gustafsson:
Show 10 quoted lines
> On Thu, Sep 11, 2014 at 10:33:51PM +0200, Cole wrote: >> Also if there is anything else you are currently looking at regarding >> submodules or thinking about, I would be glad to hear about it or to try >> look at it while I am working on these changes. Or if there is anything >> you can think of for me to check with regards to these changes that >> would also be appreciated. > > When implementing the --depth argument for submodules, I would have > prefered that the depth was set from the commit of the submodules > refered from the superprojekt and not it's branch.
That would help recursive fetch too.
Show 9 quoted lines
> However this can't be done, since you can only clone from refs and not > from a commit. However there's nothing that stops us from allowing to > clone from a commit (of course we need to make sure that that commit is > in a tree with a ref as leaf). > > I see this as a natural next step for the --depth function and something > needed for it to be really useful. I'm actually suprised that people > successfully uses the --depth function already since you always need to > know how deep down the commit is.
I suspect this only works because users set the depth high enough or the submodule is updated frequently to the tip of a branch.