Skip to content

Commit 4a4804e

Browse files
nasamuffingitster
authored andcommitted
bugreport: include user interactive shell
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 39f4919 commit 4a4804e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Documentation/git-bugreport.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The following information is captured automatically:
2929
- uname sysname, release, version, and machine strings
3030
- Compiler-specific info string
3131
- A list of enabled hooks
32+
- $SHELL
3233

3334
This tool is invoked via the typical Git setup process, which means that in some
3435
cases, it might not be able to launch - for example, if a relevant config file

bugreport.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
static void get_system_info(struct strbuf *sys_info)
1010
{
1111
struct utsname uname_info;
12+
char *shell = NULL;
1213

1314
/* get git version from native cmd */
1415
strbuf_addstr(sys_info, _("git version:\n"));
@@ -29,8 +30,13 @@ static void get_system_info(struct strbuf *sys_info)
2930

3031
strbuf_addstr(sys_info, _("compiler info: "));
3132
get_compiler_info(sys_info);
33+
3234
strbuf_addstr(sys_info, _("libc info: "));
3335
get_libc_info(sys_info);
36+
37+
shell = getenv("SHELL");
38+
strbuf_addf(sys_info, "$SHELL (typically, interactive shell): %s\n",
39+
shell ? shell : "<unset>");
3440
}
3541

3642
static void get_populated_hooks(struct strbuf *hook_info, int nongit)

0 commit comments

Comments
 (0)