See https://discourse.phabricator-community.org/t/how-to-have-a-shallow-git-mirror/2805/.
If you manually put a shallow clone in place on disk, git fetch fails when proxied:
# Cleared to fetch on cluster host "local.phacility.net". Exception: Unexpected "git upload-pack" protocol frame: expected "<hash> <name>\n", got "shallow 0ce1722b1687c260b923e0acb2ecc37721cfe180 ". fatal: Could not read from remote repository.
There is no legitimate way to get a shallow clone on disk and hosting shallow clones is not supported, but we should still parse the frames.