From: Shawn Pearce <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] push -s: skeleton
Date: Wed, 7 Sep 2011 16:23:13 -0700 [thread overview]
Message-ID: <CAJo=hJsLx1Q9ZDoxGn=dww5J-rO9GitH47rEme_1L8Lg0RmAqw@mail.gmail.com> (raw)
In-Reply-To: <7vpqjc0zaf.fsf@alter.siamese.dyndns.org>
On Wed, Sep 7, 2011 at 15:21, Junio C Hamano <gitster@pobox.com> wrote:
> Shawn Pearce <spearce@spearce.org> writes:
>
>> Yes. Above we flushed the req_buf and send that in an HTTP request.
>> You need to hoist this block above the "if (args->stateless_rpc)"
>> segment.
>
> What do you mean by "hoist"? For the req advertisement, it seems that you
> are not hoisting anything but duplicating the code, turning safe_write()
> followed by flush into packet-buf-flush and sending the result over the
> sideband. Shouldn't this new data be sent over the sideband-to-http the
> same way?
>
> Unless you do not want signed push over http, that is...
We do.
> diff --git a/builtin/send-pack.c b/builtin/send-pack.c
> index 3193f34..37e0313 100644
> --- a/builtin/send-pack.c
> +++ b/builtin/send-pack.c
> @@ -379,9 +379,13 @@ int send_pack(struct send_pack_args *args,
> packet_buf_write(&req_buf, "%.*s",
> (int)(ep - cp), cp);
> }
> - /* Do we need anything funky for stateless rpc? */
> - safe_write(out, req_buf.buf, req_buf.len);
> - packet_flush(out);
> + if (args->stateless_rpc) {
> + packet_buf_flush(&req_buf);
> + send_sideband(out, -1, req_buf.buf, req_buf.len, LARGE_PACKET_MAX);
> + } else {
> + safe_write(out, req_buf.buf, req_buf.len);
> + packet_flush(out);
> + }
This sounds too late to me. I think you just caused 2 HTTP POSTs, one
a partial one with the commands and no pack data, and another with the
push certificate and the pack. Neither is useful.
--
Shawn.
next prev parent reply other threads:[~2011-09-07 23:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 20:56 [PATCH 1/2] send-pack: typofix error message Junio C Hamano
2011-09-07 20:57 ` [PATCH 2/2] push -s: skeleton Junio C Hamano
2011-09-07 21:18 ` Shawn Pearce
2011-09-07 22:21 ` Junio C Hamano
2011-09-07 23:23 ` Shawn Pearce [this message]
2011-09-08 16:24 ` Junio C Hamano
2011-09-07 22:21 ` Nguyen Thai Ngoc Duy
2011-09-07 22:40 ` Junio C Hamano
2011-09-07 23:55 ` Robin H. Johnson
2011-09-08 20:03 ` Jeff King
2011-09-09 1:30 ` Robin H. Johnson
2011-09-09 16:03 ` Joey Hess
2011-09-09 16:14 ` Drew Northup
2011-09-09 19:12 ` Jeff King
2011-09-08 4:37 ` [PATCH 3/2] Split GPG interface into its own helper library Junio C Hamano
2011-09-08 4:38 ` [PATCH 4/2] push -s: send signed push certificate Junio C Hamano
2011-09-08 5:38 ` [PATCH 5/2] push -s: receiving end Junio C Hamano
2011-09-08 9:31 ` Johan Herland
2011-09-08 16:43 ` Junio C Hamano
2011-09-08 19:35 ` [PATCH 2/2] push -s: skeleton Jeff King
2011-09-08 20:48 ` Junio C Hamano
2011-09-08 21:02 ` Jeff King
2011-09-08 22:19 ` Junio C Hamano
2011-09-09 15:34 ` Jeff King
2011-09-09 17:32 ` Junio C Hamano
[not found] ` <CAJo=hJsQvRN3Z0xJg9q37Km1g_1qUdJKNQ6n8=a9mv3YjugyVw@mail.gmail.com>
2011-09-09 15:22 ` Jeff King
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='CAJo=hJsLx1Q9ZDoxGn=dww5J-rO9GitH47rEme_1L8Lg0RmAqw@mail.gmail.com' \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).