remote-curl: supports git-upload-archive service
commit23b7d59a82ce39c0e08a4052de3be9ffbccd99b9
authorJiang Xin <zhiyou.jx@alibaba-inc.com>
Sun, 21 Jan 2024 13:15:34 +0000 (21 21:15 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jan 2024 15:54:37 +0000 (22 07:54 -0800)
tree3d6b305e3c290a9194e63e4beacb1bad26365022
parent4a61faf75d684eb31c23521bc0e3c3cac5fd1553
remote-curl: supports git-upload-archive service

Add new service (git-upload-archive) support in remote-curl, so we can
support remote archive over HTTP/HTTPS protocols. Differences between
git-upload-archive and other services:

 1. The git-archive program does not expect to see protocol version and
    capabilities when connecting to remote-helper, so do not send them
    in remote-curl for the git-upload-archive service.

 2. We need to detect protocol version by calling discover_refs().
    Fallback to use the git-upload-pack service (which, like
    git-upload-archive, is a read-only operation) to discover protocol
    version.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-curl.c