Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Shaffer <emilyshaffer@google.com>2020-04-17 00:18:06 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-17 01:23:42 +0300
commit1411914a1cbd6f5680e33db9817a1aecb01f8817 (patch)
tree11d5b84762347b65cd11de154c268e5d329e8b86 /bugreport.c
parent617d57195ae844a43486b2e0ad0b7ac36aaddfdd (diff)
bugreport: add uname info
The contents of uname() can give us some insight into what sort of system the user is running on, and help us replicate their setup if need be. The domainname field is not guaranteed to be available, so don't collect it. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bugreport.c')
-rw-r--r--bugreport.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/bugreport.c b/bugreport.c
index 4cdb58bbaa..1a3172bcec 100644
--- a/bugreport.c
+++ b/bugreport.c
@@ -7,10 +7,24 @@
static void get_system_info(struct strbuf *sys_info)
{
+ struct utsname uname_info;
+
/* get git version from native cmd */
strbuf_addstr(sys_info, _("git version:\n"));
get_version_info(sys_info, 1);
- strbuf_complete_line(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);
}
static const char * const bugreport_usage[] = {