From: <rsbecker@nexbridge.com>
To: "'Jiang Xin'" <worldhello.net@gmail.com>
Cc: "'Eric Sunshine'" <sunshine@sunshineco.com>,
"'Git List'" <git@vger.kernel.org>,
"'Junio C Hamano'" <gitster@pobox.com>,
"'Brandon Williams'" <bwilliams.eng@gmail.com>,
"'Ilari Liusvaara'" <ilari.liusvaara@elisanet.fi>,
"'Jiang Xin'" <zhiyou.jx@alibaba-inc.com>
Subject: RE: [PATCH v2 3/3] archive: support remote archive from stateless transport
Date: Sun, 24 Sep 2023 21:04:49 -0400 [thread overview]
Message-ID: <007b01d9ef4c$4c4e8eb0$e4ebac10$@nexbridge.com> (raw)
In-Reply-To: <CANYiYbGf4U2_UG674GqfauNPg+TgOtzRT=xCJ=x0gHM+TcrNpQ@mail.gmail.com>
On Sunday, September 24, 2023 8:16 PM, Jiang Xin wrote:
>On Mon, Sep 25, 2023 at 7:58 AM <rsbecker@nexbridge.com> wrote:
>>
>> On Sunday, September 24, 2023 7:40 PM, Jiang Xin wrote:
>> >On Sun, Sep 24, 2023 at 2:52 PM Eric Sunshine
>> ><sunshine@sunshineco.com>
>> >wrote:
>> >>
>> >> On Sat, Sep 23, 2023 at 11:22 AM Jiang Xin <worldhello.net@gmail.com>
>wrote:
>> >> > 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.
>> >> > [...]
>> >> > Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
>> >> > ---
>> >> > diff --git a/http-backend.c b/http-backend.c @@ -639,10 +640,19
>> >> > @@ static void check_content_type(struct strbuf *hdr, const char
>*accepted_type)
>> >> > - const char *argv[] = {NULL, "--stateless-rpc", ".", NULL};
>> >> > + const char *argv[4];
>> >> >
>> >> > + if (!strcmp(service_name, "git-upload-archive")) {
>> >> > + argv[1] = ".";
>> >> > + argv[2] = NULL;
>> >> > + } else {
>> >> > + argv[1] = "--stateless-rpc";
>> >> > + argv[2] = ".";
>> >> > + argv[3] = NULL;
>> >> > + }
>> >>
>> >> It may not be worth a reroll, but since you're touching this code
>> >> anyhow, these days we'd use `strvec` for this:
>> >>
>> >> struct strvec argv = STRVEC_INIT;
>> >> if (strcmp(service_name, "git-upload-archive"))
>> >> strvec_push(&argv, "--stateless-rpc");
>> >> strvec_push(&argv, ".");
>> >
>> >Good suggestion, I'll queue this up as part of next reroll.
>>
>> Which test covers this change?
>
>See: https://lore.kernel.org/git/20230923152201.14741-4-
>worldhello.net@gmail.com/#Z31t:t5003-archive-zip.sh
Thanks. That is what I needed. Looking forward to the merge.
--Randall
next prev parent reply other threads:[~2023-09-25 1:05 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 6:41 [PATCH 1/2] transport-helper: no connection restriction in connect_helper Jiang Xin
2023-09-19 6:41 ` [PATCH 2/2] archive: support remote archive from stateless transport Jiang Xin
2023-09-19 17:18 ` [PATCH 1/2] transport-helper: no connection restriction in connect_helper Junio C Hamano
2023-09-20 0:20 ` Jiang Xin
2023-09-23 15:21 ` [PATCH v2 0/3] support remote archive from stateless transport Jiang Xin
2023-09-25 22:21 ` Junio C Hamano
2023-09-26 0:43 ` Jiang Xin
2023-09-23 15:21 ` [PATCH v2 1/3] transport-helper: no connection restriction in connect_helper Jiang Xin
2023-09-25 21:11 ` Junio C Hamano
2023-09-23 15:22 ` [PATCH v2 2/3] transport-helper: run do_take_over " Jiang Xin
2023-09-25 21:34 ` Junio C Hamano
2023-10-04 14:00 ` Jiang Xin
2023-10-04 15:21 ` [PATCH v3 0/4] support remote archive from stateless transport Jiang Xin
2023-10-04 15:21 ` [PATCH v3 1/4] transport-helper: no connection restriction in connect_helper Jiang Xin
2023-10-04 15:21 ` [PATCH v3 2/4] transport-helper: call do_take_over() in process_connect Jiang Xin
2023-10-04 18:29 ` Junio C Hamano
2023-10-04 15:21 ` [PATCH v3 3/4] transport-helper: call do_take_over() in connect_helper Jiang Xin
2023-10-04 15:21 ` [PATCH v3 4/4] archive: support remote archive from stateless transport Jiang Xin
2023-12-14 14:13 ` [PATCH v4 0/4] support remote archive via " Jiang Xin
2023-12-14 14:13 ` [PATCH v4 1/4] transport-helper: no connection restriction in connect_helper Jiang Xin
2024-01-12 7:42 ` Linus Arver
2024-01-12 21:50 ` Junio C Hamano
2024-01-16 9:04 ` Jiang Xin
2024-01-18 22:26 ` Linus Arver
2024-01-19 10:56 ` Jiang Xin
2024-01-20 20:25 ` Linus Arver
2023-12-14 14:13 ` [PATCH v4 2/4] transport-helper: call do_take_over() in process_connect Jiang Xin
2023-12-14 14:13 ` [PATCH v4 3/4] transport-helper: call do_take_over() in connect_helper Jiang Xin
2024-01-12 7:56 ` Linus Arver
2024-01-16 9:41 ` Jiang Xin
2023-12-14 14:13 ` [PATCH v4 4/4] archive: support remote archive from stateless transport Jiang Xin
2024-01-12 8:12 ` Linus Arver
2024-01-16 13:39 ` [PATCH v5 0/6] support remote archive via " Jiang Xin
2024-01-16 13:39 ` [PATCH v5 1/6] transport-helper: no connection restriction in connect_helper Jiang Xin
2024-01-20 20:28 ` Linus Arver
2024-01-16 13:39 ` [PATCH v5 2/6] remote-curl: supports git-upload-archive service Jiang Xin
2024-01-20 20:30 ` Linus Arver
2024-01-16 13:39 ` [PATCH v5 3/6] transport-helper: protocol-v2 supports upload-archive Jiang Xin
2024-01-16 13:39 ` [PATCH v5 4/6] http-backend: new rpc-service for git-upload-archive Jiang Xin
2024-01-16 13:39 ` [PATCH v5 5/6] transport-helper: call do_take_over() in connect_helper Jiang Xin
2024-01-20 20:37 ` Linus Arver
2024-01-16 13:39 ` [PATCH v5 6/6] transport-helper: call do_take_over() in process_connect Jiang Xin
2024-01-20 20:43 ` [PATCH v5 0/6] support remote archive via stateless transport Linus Arver
2024-01-21 4:09 ` Jiang Xin
2024-01-21 13:15 ` [PATCH v6 " Jiang Xin
2024-01-21 13:15 ` [PATCH v6 1/6] transport-helper: no connection restriction in connect_helper Jiang Xin
2024-01-21 13:15 ` [PATCH v6 2/6] remote-curl: supports git-upload-archive service Jiang Xin
2024-01-21 13:15 ` [PATCH v6 3/6] transport-helper: protocol v2 supports upload-archive Jiang Xin
2024-01-21 13:15 ` [PATCH v6 4/6] http-backend: new rpc-service for git-upload-archive Jiang Xin
2024-01-21 13:15 ` [PATCH v6 5/6] transport-helper: call do_take_over() in connect_helper Jiang Xin
2024-01-21 13:15 ` [PATCH v6 6/6] transport-helper: call do_take_over() in process_connect Jiang Xin
2024-01-21 16:57 ` [PATCH v6 0/6] support remote archive via stateless transport Linus Arver
2024-01-22 15:54 ` Junio C Hamano
2023-09-23 15:22 ` [PATCH v2 3/3] archive: support remote archive from " Jiang Xin
2023-09-24 6:52 ` Eric Sunshine
2023-09-24 23:39 ` Jiang Xin
2023-09-24 23:58 ` rsbecker
2023-09-25 0:15 ` Jiang Xin
2023-09-25 1:04 ` rsbecker [this message]
2023-09-24 13:41 ` Phillip Wood
2023-09-24 23:36 ` Jiang Xin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='007b01d9ef4c$4c4e8eb0$e4ebac10$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=bwilliams.eng@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ilari.liusvaara@elisanet.fi \
--cc=sunshine@sunshineco.com \
--cc=worldhello.net@gmail.com \
--cc=zhiyou.jx@alibaba-inc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.