Skip to content

Commit 0aaca2f

Browse files
committed
help: include fsmonitor--daemon feature flag in version info
Add the "feature: fsmonitor--daemon" message to the output of `git version --build-options`. This allows users to know if the built-in fsmonitor feature is supported on their platform. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent dfcd3e5 commit 0aaca2f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

help.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "version.h"
1212
#include "refs.h"
1313
#include "parse-options.h"
14+
#include "fsmonitor-ipc.h"
1415

1516
struct category_description {
1617
uint32_t category;
@@ -664,6 +665,9 @@ void get_version_info(struct strbuf *buf, int show_build_options)
664665
strbuf_addf(buf, "sizeof-size_t: %d\n", (int)sizeof(size_t));
665666
strbuf_addf(buf, "shell-path: %s\n", SHELL_PATH);
666667
/* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */
668+
669+
if (fsmonitor_ipc__is_supported())
670+
strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
667671
}
668672
}
669673

t/test-lib.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,3 +1674,9 @@ test_lazy_prereq REBASE_P '
16741674
# Tests that verify the scheduler integration must set this locally
16751675
# to avoid errors.
16761676
GIT_TEST_MAINT_SCHEDULER="none:exit 1"
1677+
1678+
# Does this platform support `git fsmonitor--daemon`
1679+
#
1680+
test_lazy_prereq FSMONITOR_DAEMON '
1681+
git version --build-options | grep "feature:" | grep "fsmonitor--daemon"
1682+
'

0 commit comments

Comments
 (0)