git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Josh Steadmon <steadmon@google.com>
To: git@vger.kernel.org
Cc: peff@peff.net, jrnieder@gmail.com
Subject: [PATCH v2] protocol-capabilities.txt: document symref
Date: Wed, 13 Feb 2019 15:41:28 -0800	[thread overview]
Message-ID: <cb1b2834b7365f6277d1ec573cee7fd68a7329d0.1550100949.git.steadmon@google.com> (raw)
In-Reply-To: <4ffb11ff776166944673ba3bdb96a9d20eb14df7.1549929088.git.steadmon@google.com>

In 7171d8c15f ("upload-pack: send symbolic ref information as
capability"), we added a symref capability to the pack protocol, but it
was never documented. Adapt the patch notes from that commit and add
them to the capabilities documentation.

Signed-off-by: Josh Steadmon <steadmon@google.com>
---
Range-diff against v1:
1:  4ffb11ff77 ! 1:  cb1b2834b7 protocol-capabilities.txt: document symref
    @@ -12,6 +12,17 @@
      diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
      --- a/Documentation/technical/protocol-capabilities.txt
      +++ b/Documentation/technical/protocol-capabilities.txt
    +@@
    + Git Protocol Capabilities
    + =========================
    + 
    ++NOTE: this document describes capabilities for versions 0 and 1 of the pack
    ++protocol. For version 2, please refer to the link:protocol-v2.html[protocol-v2]
    ++doc.
    ++
    + Servers SHOULD support all capabilities defined in this document.
    + 
    + On the very first line of the initial server response of either
     @@
      purposes, and MUST NOT be used to programmatically assume the presence
      or absence of particular features.

 .../technical/protocol-capabilities.txt        | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
index 332d209b58..2b267c0da6 100644
--- a/Documentation/technical/protocol-capabilities.txt
+++ b/Documentation/technical/protocol-capabilities.txt
@@ -1,6 +1,10 @@
 Git Protocol Capabilities
 =========================
 
+NOTE: this document describes capabilities for versions 0 and 1 of the pack
+protocol. For version 2, please refer to the link:protocol-v2.html[protocol-v2]
+doc.
+
 Servers SHOULD support all capabilities defined in this document.
 
 On the very first line of the initial server response of either
@@ -172,6 +176,20 @@ agent strings are purely informative for statistics and debugging
 purposes, and MUST NOT be used to programmatically assume the presence
 or absence of particular features.
 
+symref
+------
+
+This parameterized capability is used to inform the receiver which symbolic ref
+points to which ref; for example, "symref=HEAD:refs/heads/master" tells the
+receiver that HEAD points to master. This capability can be repeated to
+represent multiple symrefs.
+
+Servers SHOULD include this capability for the HEAD symref if it is one of the
+refs being sent.
+
+Clients MAY use the parameters from this capability to select the proper initial
+branch when cloning a repository.
+
 shallow
 -------
 
-- 
2.20.1.791.gb4d0f1c61a-goog


  parent reply	other threads:[~2019-02-13 23:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 23:52 [PATCH] protocol-capabilities.txt: document symref Josh Steadmon
2019-02-11 23:58 ` Jonathan Nieder
2019-02-12  0:05 ` Jeff King
2019-02-12  0:07   ` Josh Steadmon
2019-02-13 23:41 ` Josh Steadmon [this message]
2019-02-14  3:56   ` [PATCH v2] " Jeff King
2019-02-20  0:32     ` Josh Steadmon
2019-02-21 17:38       ` Junio C Hamano
2019-02-20  0:32 ` [PATCH v3] " Josh Steadmon

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=cb1b2834b7365f6277d1ec573cee7fd68a7329d0.1550100949.git.steadmon@google.com \
    --to=steadmon@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /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).