]> git.ipfire.org Git - thirdparty/git.git/commitdiff
bugreport: include user interactive shell
authorEmily Shaffer <emilyshaffer@google.com>
Tue, 12 May 2020 23:42:13 +0000 (16:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 May 2020 05:02:20 +0000 (22:02 -0700)
It's possible a user may complain about the way that Git interacts with
their interactive shell, e.g. autocompletion or shell prompt. In that
case, it's useful for us to know which shell they're using
interactively.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-bugreport.txt
bugreport.c

index 7fe9aef34ea86ae0a5e1d273eb0f5a4c5a3e9066..4afc48c4526330bc38ff9eb41f6630ded672be81 100644 (file)
@@ -29,6 +29,7 @@ The following information is captured automatically:
  - uname sysname, release, version, and machine strings
  - Compiler-specific info string
  - A list of enabled hooks
+ - $SHELL
 
 This tool is invoked via the typical Git setup process, which means that in some
 cases, it might not be able to launch - for example, if a relevant config file
index aa8a489c35e8f48799e6e3e3d39e585724c89c3d..28f4568b01f28bbbb8e6de4c07c92947533e6ef7 100644 (file)
@@ -9,6 +9,7 @@
 static void get_system_info(struct strbuf *sys_info)
 {
        struct utsname uname_info;
+       char *shell = NULL;
 
        /* get git version from native cmd */
        strbuf_addstr(sys_info, _("git version:\n"));
@@ -29,8 +30,13 @@ static void get_system_info(struct strbuf *sys_info)
 
        strbuf_addstr(sys_info, _("compiler info: "));
        get_compiler_info(sys_info);
+
        strbuf_addstr(sys_info, _("libc info: "));
        get_libc_info(sys_info);
+
+       shell = getenv("SHELL");
+       strbuf_addf(sys_info, "$SHELL (typically, interactive shell): %s\n",
+                   shell ? shell : "<unset>");
 }
 
 static void get_populated_hooks(struct strbuf *hook_info, int nongit)