Re: [PATCH] submodule: plumb --filter to cloned submodules
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jul 24, 2019, 22:18 UTC
- Message-ID
- <20190724221815.187788-1-jonathantanmy@google.com>
- In-Reply-To
- <52bf9d45b8e2b72ff32aa773f2415bf7b2b86da2.1563322192.git.steadmon@google.com>
Show 9 quoted lines
> When cloning a repo with a --filter and with --recurse-submodules > enabled, the partial clone filter only applies to the top-level repo. > This can lead to unexpected bandwidth and disk usage for projects which > include large submodules. > > Fix this by plumbing the --filter argument from git-clone through > git-submodule and git-submodule--helper. > > Signed-off-by: Josh Steadmon <steadmon@google.com>
Sorry for not catching this earlier. The cloning itself might work, but I don't think we support partial-clone submodules right now. In particular, anything that operates on submodules in-process like grep (which either adds submodule objects as alternates or calls the object-loading functions using a different struct repo) will not work, because we only support lazy loading on the_repository. So if we want this feature, there is some other work that we will need to do first.