[Development] Partially Cloning Qt Repositories with Git Filtering

Karl Semich 0xloem at gmail.com
Sun Jun 26 01:30:17 CEST 2022


Hi Qt,

The Qt git repositories can at times seem large. Git has support now
for "filtering" or "partial clone". Some hits from a websearch:

- https://docs.gitlab.com/ee/topics/git/partial_clone.html
- https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

This feature lets users download only the objects they are using,
automatically fetching new ones when needed. Unfortunately, it needs
server side support. The git server running on code.qt.io does not
have this support:

$ git --version
git version 2.36.1.37.gdc8c8deaa6
$ git clone  --filter=blob:none --recurse-submodules
--also-filter-submodules  git://code.qt.io/qt/qt5.git
Cloning into 'qt5'...
warning: filtering not recognized by server, ignoring

A web search indicates the way to enable this may be this server-side option:

git config --global uploadpack.allowFilter true

from https://stackoverflow.com/questions/54332298/git-clone-with-filtering-filtering-not-recognized-by-server-ignoring-bitbucke/55366030#55366030
and also mentioned in Documentation/config in the official git tree.

I checked git's history and it looks like this config option is around
as of v2.18.0 . There were some bugfixes since then.

Thanks for your quality major development platform.


More information about the Development mailing list