Enabling the gitaly_upload_pack_filter feature flag isn't enough for Partial clone
Using GitLab Enterprise Edition 12.8.0-ee from the omnibus packages on a Digital Ocean droplet, I found that what is documented on https://docs.gitlab.com/ee/topics/git/partial_clone.html doesn't actually work.
After enabling the feature flag in the rails console:
# gitlab-rails console
--------------------------------------------------------------------------------
GitLab: 12.8.0-ee (0bd32f78864) EE
GitLab Shell: 11.0.0
PostgreSQL: 10.12
--------------------------------------------------------------------------------
Loading production environment (Rails 6.0.2)
irb(main):001:0> Feature.enable(:gitaly_upload_pack_filter)
=> nil`
irb(main):002:0> Feature.enabled?(:gitaly_upload_pack_filter)
=> true
irb(main):003:0>
I still get warning: filtering not recognized by server, ignoring
when cloning with git clone --filter='blob:limit=1m' --no-checkout git@64.227.74.213.nip.io:christian/git.git
, and the files that should be excluded by the filter are actually part of the clone.
If I manually change the config on the server using:
/opt/gitlab/embedded/bin# ./git config --system uploadpack.allowFilter true
/opt/gitlab/embedded/bin# ./git config --system uploadpack.allowAnySHA1InWant true
it actually works correctly. I don't get warning: filtering not recognized by server, ignoring
and the files that should be excluded are actually excluded.
cc @jramsay
Edited by Christian Couder