Skip to content

Commit af60826

Browse files
peffgitster
authored andcommitted
document 'agent' protocol capability
This was added in ff5effd (include agent identifier in capability string, 2012-08-03), but neither the syntax nor the semantics were ever documented outside of the commit message. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9354b9a commit af60826

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Documentation/technical/protocol-capabilities.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ The 'report-status' and 'delete-refs' capabilities are sent and
2222
recognized by the receive-pack (push to server) process.
2323

2424
The 'ofs-delta' and 'side-band-64k' capabilities are sent and recognized
25-
by both upload-pack and receive-pack protocols.
25+
by both upload-pack and receive-pack protocols. The 'agent' capability
26+
may optionally be sent in both protocols.
2627

2728
All other capabilities are only recognized by the upload-pack (fetch
2829
from server) process.
@@ -123,6 +124,20 @@ Server can send, and client understand PACKv2 with delta referring to
123124
its base by position in pack rather than by an obj-id. That is, they can
124125
send/read OBJ_OFS_DELTA (aka type 6) in a packfile.
125126

127+
agent
128+
-----
129+
130+
The server may optionally send a capability of the form `agent=X` to
131+
notify the client that the server is running version `X`. The client may
132+
optionally return its own agent string by responding with an `agent=Y`
133+
capability (but it MUST NOT do so if the server did not mention the
134+
agent capability). The `X` and `Y` strings may contain any printable
135+
ASCII characters except space (i.e., the byte range 32 < x < 127), and
136+
are typically of the form "package/version" (e.g., "git/1.8.3.1"). The
137+
agent strings are purely informative for statistics and debugging
138+
purposes, and MUST NOT be used to programatically assume the presence
139+
or absence of particular features.
140+
126141
shallow
127142
-------
128143

0 commit comments

Comments
 (0)