git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Fredrik GustafssonNext: Jens Lehmann
Message 5 of 6 in “submodule: add ability to shallowly clone any branch in a submodule”
  1. submodule: add ability to shallowly clone any branch in a submoduleCole Minnaar, Sep 11, 2014
  2. Jens LehmannSep 11, 2014
  3. ColeSep 11, 2014
  4. Fredrik GustafssonSep 12, 2014
  5. Jens LehmannSep 13, 2014
  6. Jens LehmannSep 13, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.