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
This commit is contained in:
Junio C Hamano
2025-02-27 15:22:59 -08:00
7 changed files with 115 additions and 23 deletions

View File

@ -2043,3 +2043,11 @@ test_trailing_hash () {
test-tool hexdump |
sed "s/ //g"
}
# Trim and replace each character with ascii code below 32 or above
# 127 (included) using a dot '.' character.
# Octal intervals \001-\040 and \177-\377
# correspond to decimal intervals 1-32 and 127-255
test_redact_non_printables () {
tr -d "\n\r" | tr "[\001-\040][\177-\377]" "."
}