]> git.ipfire.org Git - thirdparty/git.git/commitdiff
help: add shell-path to --build-options
authorEmily Shaffer <emilyshaffer@google.com>
Tue, 12 May 2020 23:42:12 +0000 (16:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 May 2020 05:02:17 +0000 (22:02 -0700)
It may be useful to know which shell Git was built to try to point to,
in the event that shell-based Git commands are failing. $SHELL_PATH is
set during the build and used to launch the manpage viewer, as well as
by git-compat-util.h, and it's used during tests. 'git version
--build-options' is encouraged for use in bug reports, so it makes sense
to include this information there.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c

diff --git a/help.c b/help.c
index 1de9c0d589cd9b615b1b20d60e06b9601d08fe8f..44cee69c11c68381fbdc12a3fb6b7f5bae7f4dfe 100644 (file)
--- a/help.c
+++ b/help.c
@@ -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? */
        }
 }