aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-02-27 15:22:59 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-27 15:23:00 -0800
commit9d8cce051add2eb82cb0be97a58201c1d3fe0c1b (patch)
tree656c7d9a67e9233f2b3ecdae15a3461b49af783e /Documentation
parentGit 2.49-rc0 (diff)
parentagent: advertise OS name via agent capability (diff)
downloadgit-9d8cce051add2eb82cb0be97a58201c1d3fe0c1b.tar.gz
git-9d8cce051add2eb82cb0be97a58201c1d3fe0c1b.zip
Merge branch 'ua/os-version-capability'
The value of "uname -s" is by default sent over the wire as a part of the "version" capability. * ua/os-version-capability: agent: advertise OS name via agent capability t5701: add setup test to remove side-effect dependency version: extend get_uname_info() to hide system details version: refactor get_uname_info() version: refactor redact_non_printables() version: replace manual ASCII checks with isprint() for clarity
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitprotocol-v2.adoc10
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/gitprotocol-v2.adoc b/Documentation/gitprotocol-v2.adoc
index 1652fef3ae..9f6350bbf2 100644
--- a/Documentation/gitprotocol-v2.adoc
+++ b/Documentation/gitprotocol-v2.adoc
@@ -184,9 +184,13 @@ form `agent=X`) to notify the client that the server is running version
the `agent` capability with a value `Y` (in the form `agent=Y`) in its
request to the server (but it MUST NOT do so if the server did not
advertise the agent capability). The `X` and `Y` strings may contain any
-printable ASCII characters except space (i.e., the byte range 32 < x <
-127), and are typically of the form "package/version" (e.g.,
-"git/1.8.3.1"). The agent strings are purely informative for statistics
+printable ASCII characters except space (i.e., the byte range 33 <= x <=
+126), and are typically of the form "package/version-os" (e.g.,
+"git/1.8.3.1-Linux") where `os` is the operating system name (e.g.,
+"Linux"). `X` and `Y` can be configured using the GIT_USER_AGENT
+environment variable and it takes priority. The `os` is
+retrieved using the 'sysname' field of the `uname(2)` system call
+or its equivalent. The 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.