Skip to content

Commit ce095ec

Browse files
committed
Merge branch 'es/bugreport-shell'
"git bugreport" learns to report what shell is in use. * es/bugreport-shell: bugreport: include user interactive shell help: add shell-path to --build-options
2 parents dc57a9b + 4a4804e commit ce095ec

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-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)

help.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ void get_version_info(struct strbuf *buf, int show_build_options)
641641
strbuf_addstr(buf, "no commit associated with this build\n");
642642
strbuf_addf(buf, "sizeof-long: %d\n", (int)sizeof(long));
643643
strbuf_addf(buf, "sizeof-size_t: %d\n", (int)sizeof(size_t));
644+
strbuf_addf(buf, "shell-path: %s\n", SHELL_PATH);
644645
/* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */
645646
}
646647
}

0 commit comments

Comments
 (0)