diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-06-08 18:06:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-06-08 18:06:28 -0700 |
| commit | ce095ecfe49791508860fc180bf67924d62503ba (patch) | |
| tree | 94a52fd1e84ab3e2974a8b9d58f93e058ef85f95 | |
| parent | Merge branch 'tb/commit-graph-no-check-oids' (diff) | |
| parent | bugreport: include user interactive shell (diff) | |
| download | git-ce095ecfe49791508860fc180bf67924d62503ba.tar.gz git-ce095ecfe49791508860fc180bf67924d62503ba.zip | |
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
| -rw-r--r-- | Documentation/git-bugreport.txt | 1 | ||||
| -rw-r--r-- | bugreport.c | 6 | ||||
| -rw-r--r-- | help.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt index 9edad66a63..66e88c2e31 100644 --- a/Documentation/git-bugreport.txt +++ b/Documentation/git-bugreport.txt @@ -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 diff --git a/bugreport.c b/bugreport.c index aa8a489c35..28f4568b01 100644 --- a/bugreport.c +++ b/bugreport.c @@ -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) @@ -641,6 +641,7 @@ void get_version_info(struct strbuf *buf, int show_build_options) strbuf_addstr(buf, "no commit associated with this build\n"); strbuf_addf(buf, "sizeof-long: %d\n", (int)sizeof(long)); strbuf_addf(buf, "sizeof-size_t: %d\n", (int)sizeof(size_t)); + strbuf_addf(buf, "shell-path: %s\n", SHELL_PATH); /* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */ } } |
