git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] protocol-capabilities.txt: document symref

From
Josh Steadmon <steadmon@google.com>
Date
Feb 11, 2019, 23:52 UTC
Message-ID
<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>
---
 Documentation/technical/protocol-capabilities.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
index 332d209b58..0ccdbadbe9 100644
--- a/Documentation/technical/protocol-capabilities.txt
+++ b/Documentation/technical/protocol-capabilities.txt
@@ -172,6 +172,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
Next: Jonathan Nieder
Message 1 of 9 in “protocol-capabilities.txt: document symref”
  1. protocol-capabilities.txt: document symrefJosh Steadmon, Feb 11, 2019
  2. Jonathan NiederFeb 11, 2019
  3. Jeff KingFeb 12, 2019
  4. Josh SteadmonFeb 12, 2019
  5. protocol-capabilities.txt: document symrefJosh Steadmon, Feb 13, 2019
  6. Jeff KingFeb 14, 2019
  7. Josh SteadmonFeb 20, 2019
  8. Junio C HamanoFeb 21, 2019
  9. protocol-capabilities.txt: document symrefJosh Steadmon, Feb 20, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.