git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Advertise OS version
@ 2024-06-19 12:57 Christian Couder
  2024-06-19 12:57 ` [PATCH 1/3] version: refactor strbuf_sanitize() Christian Couder
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Christian Couder @ 2024-06-19 12:57 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Patrick Steinhardt, John Cai, Johannes Schindelin,
	Christian Couder

For debugging and statistical purposes, it can be useful for Git
servers to know the OS the client are using.

So let's add a new 'os-version' capability to the v2 protocol, in the
same way as the existing 'agent' capability that lets clients and
servers exchange the Git version they are running.

This sends the same info as `git bugreport` is already sending, which
uses uname(2). It should be the same as what `uname -srvm` returns,
except that it is sanitized in the same way as the Git version sent by
the 'agent' capability is sanitized (by replacing character having an
ascii code less than 32 or more than 127 with '.').

CI tests are currently failing on Windows as it looks like uname(1)
and uname(2) don't report the same thing:

  -os-version=MINGW64_NT-10.0-20348.3.4.10-87d57229.x86_64.2024-02-14.20:17.UTC.x86_64
  +os-version=Windows.10.0.20348

(See: https://github.com/chriscool/git/actions/runs/9581822699)

Thoughts?

Christian Couder (3):
  version: refactor strbuf_sanitize()
  version: refactor get_uname_info()
  connect: advertise OS version

 Documentation/gitprotocol-v2.txt | 18 +++++++++
 builtin/bugreport.c              | 13 +------
 connect.c                        |  3 ++
 serve.c                          | 12 ++++++
 t/t5555-http-smart-common.sh     |  3 ++
 t/t5701-git-serve.sh             |  3 ++
 version.c                        | 67 ++++++++++++++++++++++++++++----
 version.h                        | 10 +++++
 8 files changed, 111 insertions(+), 18 deletions(-)

-- 
2.45.2.563.g6aa460b3cb


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-12-10 18:52 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 12:57 [PATCH 0/3] Advertise OS version Christian Couder
2024-06-19 12:57 ` [PATCH 1/3] version: refactor strbuf_sanitize() Christian Couder
2024-06-19 18:40   ` Eric Sunshine
2024-06-19 12:57 ` [PATCH 2/3] version: refactor get_uname_info() Christian Couder
2024-06-19 12:57 ` [PATCH 3/3] connect: advertise OS version Christian Couder
2024-06-19 13:18 ` [PATCH 0/3] Advertise " Dragan Simic
2024-06-19 13:45   ` Jeff King
2024-06-19 13:50     ` Dragan Simic
2024-06-19 14:01       ` Christian Couder
2024-06-19 14:19         ` Dragan Simic
2024-06-19 14:41           ` rsbecker
2024-06-19 14:52             ` Jeff King
2024-06-19 14:57               ` rsbecker
2024-06-19 15:53             ` Dragan Simic
2024-06-19 14:50         ` Jeff King
2024-06-19 15:25           ` rsbecker
2024-06-19 22:46           ` brian m. carlson
2024-06-20 15:25             ` Jeff King
2024-06-20 16:28 ` Junio C Hamano
2024-12-09 16:14   ` Usman Akinyemi
2024-12-09 16:34     ` rsbecker
2024-12-10 18:51       ` Usman Akinyemi

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 NNTP newsgroup(s).