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

Re: git clone --filter=blob:limit=X interaction with submodules?

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jun 17, 2020, 23:20 UTC
Message-ID
<20200617232018.148877-1-jonathantanmy@google.com>
In-Reply-To
<CAE5ih79vZDzKQ1TSNTrL_64XjZH-DJTPqdPH5NMwOrsbaH=n+g@mail.gmail.com>
Show 10 quoted lines
> I noticed that if I do git clone with submodules, using
> "--filter=blob:limit=whatever" that the filter is applied in the super
> project, but appears to be ignored in the sub modules.
> 
> Is that expected behaviour? Or am I just doing it wrong?
> 
> I'm using git 2.27.0.90.geebb51ba8c.
> 
> Thanks
> Luke

Yes, that's expected. The main technical reason is that a lot of the subsequent submodule operations may read objects from the submodules, and those could trigger on-demand fetches (if the submodules were themselves partial clones) - but right now the fetch code is designed to run only on one repository.

For those who would like to improve this state of affairs, one step in the right direction would be to update the fetch and transport code to support an arbitrary "struct repository" passed in, and not just operate on the_repository.

Previous: Luke DiamandNext: Luke Diamand
Message 2 of 3 in “git clone --filter=blob:limit=X interaction with submodules?”
  1. Luke DiamandJun 17, 2020
  2. Jonathan TanJun 17, 2020
  3. Luke DiamandJun 19, 2020

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.