git_remote_download returns Invalid if git server doesn't include in allow-tip-sha1-in-want in git-upload-pack-advertisement. gitlib2 should not require this flag to align with the behaviour of the reference implementation git fetch <remote> <oid>.
To reproduce:
- serve a git repo with default settings (and
http.receivepack = true) using git-http-backend and reqest refs using git_remote_download using a http remote and it will return Invalid.
- add the http remote in the standard git client and successfully receive the oids with
git fetch <remote> <oid>
- add git config
uploadpack.allowTipSHA1InWant = true and successfully receive the oids using git_remote_download
Context: I am using rust git2 wrapper for a git-remote-helper and whilst the large git servers all advertise allow-tip-sha1-in-want many self-hosted setups do not.