git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git clone --filter=blob:limit=X interaction with submodules?
@ 2020-06-17 19:14 Luke Diamand
  2020-06-17 23:20 ` Jonathan Tan
  0 siblings, 1 reply; 3+ messages in thread
From: Luke Diamand @ 2020-06-17 19:14 UTC (permalink / raw)
  To: Git Users; +Cc: Andrew Oakley

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git clone --filter=blob:limit=X interaction with submodules?
  2020-06-17 19:14 git clone --filter=blob:limit=X interaction with submodules? Luke Diamand
@ 2020-06-17 23:20 ` Jonathan Tan
  2020-06-19 14:00   ` Luke Diamand
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Tan @ 2020-06-17 23:20 UTC (permalink / raw)
  To: luke; +Cc: git, andrew, Jonathan Tan

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git clone --filter=blob:limit=X interaction with submodules?
  2020-06-17 23:20 ` Jonathan Tan
@ 2020-06-19 14:00   ` Luke Diamand
  0 siblings, 0 replies; 3+ messages in thread
From: Luke Diamand @ 2020-06-19 14:00 UTC (permalink / raw)
  To: Jonathan Tan; +Cc: Git Users, Andrew Oakley

On Thu, 18 Jun 2020 at 00:20, Jonathan Tan <jonathantanmy@google.com> wrote:
>
> > 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.

Would this also explain why I get errors when syncing my superproject:

$ git pull --rebase
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), 844 bytes | 844.00 KiB/s, done.
Resolving deltas: 100% (2/2), completed with 2 local objects.
From ssh://whatever/somerepo
   7a9c9e1eeee..3325285b122  master     -> origin/master
fatal: git upload-pack: not our ref edcedb543a8b85c659ab7cb507bdb0211fb21bdf
fatal: remote error: upload-pack: not our ref
edcedb543a8b85c659ab7cb507bdb0211fb21bdf
The SSH command failed, please check the server logs for details.

This happens consistently when pulling from a repo that was originally
cloned using --filter. The same repo without the filtering does not
have this problem.

>
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-19 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 19:14 git clone --filter=blob:limit=X interaction with submodules? Luke Diamand
2020-06-17 23:20 ` Jonathan Tan
2020-06-19 14:00   ` Luke Diamand

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).