aboutsummaryrefslogtreecommitdiff
path: root/builtin/bugreport.c
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 /builtin/bugreport.c
parent08bdfd453584e489d5a551aecbdcb77584e1b958 (diff)
parentcf7ee481902df64b26ac8b1741eca861a8d2f7cc (diff)
downloadgit-9d8cce051add2eb82cb0be97a58201c1d3fe0c1b.tar.xz
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 'builtin/bugreport.c')
-rw-r--r--builtin/bugreport.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/builtin/bugreport.c b/builtin/bugreport.c
index 0ac59cc8dc..66d64bfd5a 100644
--- a/builtin/bugreport.c
+++ b/builtin/bugreport.c
@@ -12,10 +12,10 @@
#include "diagnose.h"
#include "object-file.h"
#include "setup.h"
+#include "version.h"
static void get_system_info(struct strbuf *sys_info)
{
- struct utsname uname_info;
char *shell = NULL;
/* get git version from native cmd */
@@ -24,16 +24,7 @@ static void get_system_info(struct strbuf *sys_info)
/* system call for other version info */
strbuf_addstr(sys_info, "uname: ");
- if (uname(&uname_info))
- strbuf_addf(sys_info, _("uname() failed with error '%s' (%d)\n"),
- strerror(errno),
- errno);
- else
- strbuf_addf(sys_info, "%s %s %s %s\n",
- uname_info.sysname,
- uname_info.release,
- uname_info.version,
- uname_info.machine);
+ get_uname_info(sys_info, 1);
strbuf_addstr(sys_info, _("compiler info: "));
get_compiler_info(sys_info);