git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] protocol docs: explain receive-pack push options
Date: Fri, 5 May 2017 17:10:54 -0700	[thread overview]
Message-ID: <CAGZ79kb5vQ6_3j6r7szDvXtOdCSx6-HUeMuC9yjgMHL0jvA5BQ@mail.gmail.com> (raw)
In-Reply-To: <615007182a5e205a7074317a4c8788aa4eb009ff.1494027001.git.jonathantanmy@google.com>

On Fri, May 5, 2017 at 4:46 PM, Jonathan Tan <jonathantanmy@google.com> wrote:
> Support for push options in the receive-pack protocol (and all Git
> components that speak it) have been added over a few commits, but not
> fully documented (especially its interaction with signed pushes). Update
> the protocol documentation to include the relevant details.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
>  Documentation/technical/pack-protocol.txt | 32 +++++++++++++++++++++++++------
>  1 file changed, 26 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt
> index 5b0ba3ef2..cf7cb48c3 100644
> --- a/Documentation/technical/pack-protocol.txt
> +++ b/Documentation/technical/pack-protocol.txt
> @@ -473,13 +473,10 @@ that it wants to update, it sends a line listing the obj-id currently on
>  the server, the obj-id the client would like to update it to and the name
>  of the reference.
>
> -This list is followed by a flush-pkt. Then the push options are transmitted
> -one per packet followed by another flush-pkt. After that the packfile that
> -should contain all the objects that the server will need to complete the new
> -references will be sent.
> +This list is followed by a flush-pkt.
>
>  ----
> -  update-request    =  *shallow ( command-list | push-cert ) [packfile]
> +  update-request    =  *shallow ( command-list | push-cert )
>
>    shallow           =  PKT-LINE("shallow" SP obj-id)
>
> @@ -500,12 +497,35 @@ references will be sent.
>                       PKT-LINE("pusher" SP ident LF)
>                       PKT-LINE("pushee" SP url LF)
>                       PKT-LINE("nonce" SP nonce LF)
> +                     *PKT-LINE("push-option" SP push-option LF)
>                       PKT-LINE(LF)
>                       *PKT-LINE(command LF)
>                       *PKT-LINE(gpg-signature-lines LF)
>                       PKT-LINE("push-cert-end" LF)
>
> -  packfile          = "PACK" 28*(OCTET)
> +  push-option       =  1*CHAR
> +----
> +
> +If the server has advertised the 'push-options' capability and the client has
> +specified 'push-options' as part of the capability list above, the client then
> +sends its push options followed by a flush-pkt.

The CHAR of the push-options SHOULD NOT include an LF. Well I guess that may
be obvious when looking at PKT-LINE("push-option" SP push-option LF),
not sure if we want to mention it here.

> +
> +----
> +  push-options      =  *PKT-LINE(push-option) flush-pkt
> +----
> +
> +For backwards compatibility with older Git servers, if the client sends a push
> +cert and push options, it SHOULD send its push options both embedded within the
> +push cert and after the push cert. (Note that the push options within the cert
> +are prefixed, but the push options after the cert are not.) Both these lists
> +SHOULD be consistent.

s/SHOULD/MUST/ ?

> +
> +After that the packfile that
> +should contain all the objects that the server will need to complete the new
> +references will be sent.
> +
> +----
> +  packfile          =  "PACK" 28*(OCTET)
>  ----
>
>  If the receiving end does not support delete-refs, the sending end MUST
> --
> 2.13.0.rc1.294.g07d810a77f-goog

Thanks for writing the docs.

Stefan


>

  reply	other threads:[~2017-05-06  0:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 23:46 [PATCH 0/3] Clarify interaction between signed pushes and push options Jonathan Tan
2017-05-05 23:46 ` [PATCH 1/3] docs: correct receive.advertisePushOptions default Jonathan Tan
2017-05-05 23:50   ` Brandon Williams
2017-05-05 23:53     ` Stefan Beller
2017-05-05 23:58   ` Jonathan Nieder
2017-05-05 23:46 ` [PATCH 2/3] receive-pack: verify push options in cert Jonathan Tan
2017-05-06  0:02   ` Stefan Beller
2017-05-06  0:06     ` Brandon Williams
2017-05-06  0:20     ` Jonathan Nieder
2017-05-06  0:10   ` Jonathan Nieder
2017-05-05 23:46 ` [PATCH 3/3] protocol docs: explain receive-pack push options Jonathan Tan
2017-05-06  0:10   ` Stefan Beller [this message]
2017-05-06  0:26   ` Jonathan Nieder
2017-05-08 21:27     ` Jonathan Tan
2017-05-08  5:44 ` [PATCH 0/3] Clarify interaction between signed pushes and " Junio C Hamano
2017-05-08 21:33 ` [PATCH v2 0/2] " Jonathan Tan
2017-05-08 21:33 ` [PATCH v2 1/2] docs: correct receive.advertisePushOptions default Jonathan Tan
2017-05-08 21:33 ` [PATCH v2 2/2] receive-pack: verify push options in cert Jonathan Tan
2017-05-09  3:15   ` Junio C Hamano
2017-05-09  3:34   ` Junio C Hamano
2017-05-09 16:45     ` [PATCH] fixup! use perl instead of sed Jonathan Tan
2017-05-09 17:00       ` Ævar Arnfjörð Bjarmason
2017-05-09 19:23         ` [PATCH v3 0/2] Clarify interaction between signed pushes and push options Jonathan Tan
2017-05-09 21:01           ` [PATCH v3] fixup! don't use perl -i because it's not portable Jonathan Tan
2017-05-09 19:23         ` [PATCH v3 1/2] docs: correct receive.advertisePushOptions default Jonathan Tan
2017-05-09 19:23         ` [PATCH v3 2/2] receive-pack: verify push options in cert Jonathan Tan
2017-05-09 20:43         ` [PATCH] fixup! use perl instead of sed Johannes Sixt
2017-05-09 21:04           ` Jonathan Tan
2017-05-09 21:08           ` Ævar Arnfjörð Bjarmason
2017-05-09 22:38         ` Junio C Hamano
2017-05-09 23:44           ` Ævar Arnfjörð Bjarmason

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZ79kb5vQ6_3j6r7szDvXtOdCSx6-HUeMuC9yjgMHL0jvA5BQ@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).