I just got this kind of error: fatal: expected 'packfile', received 'shallow-info' when remote repo is a shallow repo(created by using --depth), and configured with 'ref-in-want' feature, then "git clone -C remote_repo local" failed. (tested in t/t5703-upload-pack-ref-in-want.sh) I don't know if this result is expected, and maybe the test should cover this case.