Re: [PATCH v4 4/4] archive: support remote archive from stateless transport
- From
- Linus Arver <linusa@google.com>
- Date
- Jan 12, 2024, 08:12 UTC
- Message-ID
- <owlyr0inhswp.fsf@fine.c.googlers.com>
- In-Reply-To
- <18b9a11d3be9d804e8d22d054ea881b8336d170c.1702562879.git.zhiyou.jx@alibaba-inc.com>
Jiang Xin <worldhello.net@gmail.com> writes:
Show 5 quoted lines
> From: Jiang Xin <zhiyou.jx@alibaba-inc.com> > > Even though we can establish a stateless connection, we still cannot > archive the remote repository using a stateless HTTP protocol. Try the > following steps to make it work.
As Yoda once said, "Do or do not, there is no try". Here I think you meant "Do".
Show 8 quoted lines
> 1. Add support for "git-upload-archive" service in "http-backend". > > 2. Use the URL ".../info/refs?service=git-upload-pack" to detect the > protocol version, instead of use the "git-upload-archive" service. > > 3. "git-archive" does not expect to see protocol version and > capabilities when connecting to remote-helper, so do not send them > in "remote-curl.c" for the "git-upload-archive" service.
It would be great if you could break up this patch into 3 smaller patches. Or 4 patches if you decide to move the new test cases into their own patch.
Show 8 quoted lines
> @@ -723,7 +729,8 @@ static struct service_cmd {
> {"GET", "/objects/pack/pack-[0-9a-f]{64}\\.idx$", get_idx_file},
>
> {"POST", "/git-upload-pack$", service_rpc},
> - {"POST", "/git-receive-pack$", service_rpc}
> + {"POST", "/git-receive-pack$", service_rpc},
> + {"POST", "/git-upload-archive$", service_rpc}
> };Style nit: it might be cleaner to put the new "git-upload-archive" just above "git-upload-pack" because the two have a special relationship now.