Skip to content

Git 2.22.0 rejects clone with `sparse:oid` filter options

Problem to solve

When testing #1769 (moved), I observed performing a partial clone using --filter=sparse:oid=partial-clone-tests:.gitfilterspec results in the error below:

$  git clone --no-local --no-checkout --filter=sparse:oid=partial-clone-tests:.gitfilterspec http://localhost:3021/jramsay/git.git git-sparse
BUG: refs.c:1781: attempting to get main_ref_store outside of repository

Note, this occurred after enabling uploadpack.allowFilter on the bare repository.

Proposal

This needs to be investigated and fixed before partial clone will be useful to monolithic repositories.

Links / references

Edited by James Ramsay (ex-GitLab)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information