Skip to content

Commit cb2badb

Browse files
pks-tgitster
authored andcommitted
help: report on whether or not Rust is enabled
We're about to introduce support for Rust into the core of Git, where some (trivial) subsystems are converted to Rust. These subsystems will also retain a C implementation though as Rust is not yet mandatory. Consequently, it now becomes possible for a Git version to have bugs that are specific to whether or not it is built with Rust support overall. Expose information about whether or not Git was built with Rust via our build info. This means that both `git version --build-options`, but also `git bugreport` will now expose that bit of information. Hopefully, this should make it easier for us to discover any Rust-specific issues. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e30c081 commit cb2badb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

help.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,12 @@ void get_version_info(struct strbuf *buf, int show_build_options)
791791
strbuf_addf(buf, "shell-path: %s\n", SHELL_PATH);
792792
/* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */
793793

794+
#if defined WITH_RUST
795+
strbuf_addstr(buf, "rust: enabled\n");
796+
#else
797+
strbuf_addstr(buf, "rust: disabled\n");
798+
#endif
799+
794800
if (fsmonitor_ipc__is_supported())
795801
strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
796802
#if defined LIBCURL_VERSION

0 commit comments

Comments
 (0)