git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] bugreport: include user interactive shell

From
Emily Shaffer <emilyshaffer@google.com>
Date
May 12, 2020, 23:42 UTC
Message-ID
<20200512234213.63651-3-emilyshaffer@google.com>
In-Reply-To
<20200512234213.63651-1-emilyshaffer@google.com>

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>
---
 Documentation/git-bugreport.txt | 1 +
 bugreport.c                     | 6 ++++++
 2 files changed, 7 insertions(+)
diff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt
index 7fe9aef34e..4afc48c452 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)
-- 
2.26.2.645.ge9eca65c58-goog
Previous: Emily Shaffer
Message 7 of 7 in “bugreport: collect shell settings”
  1. 0/2 bugreport: collect shell settingsEmily Shaffer, May 12, 2020
  2. 1/2 help: add shell-path to --build-optionsEmily Shaffer, May 12, 2020
  3. brian m. carlsonMay 12, 2020
  4. Junio C HamanoMay 13, 2020
  5. Eric SunshineMay 13, 2020
  6. Emily ShafferMay 13, 2020
  7. 2/2 bugreport: include user interactive shellEmily Shaffer, May 12, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.