Skip to content

Commit 8a9b342

Browse files
committed
Enable the built-in FSMonitor as an experimental feature
If `feature.experimental` and `feature.manyFiles` are set, we now start the built-in FSMonitor by default. Signed-off-by: Jeff Hostetler <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e78851a commit 8a9b342

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

repo-settings.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
#include "config.h"
33
#include "repository.h"
44
#include "midx.h"
5-
#include "compat/fsmonitor/fsm-listen.h"
5+
#include "fsmonitor-ipc.h"
6+
#include "fsmonitor-settings.h"
67

78
#define UPDATE_DEFAULT_BOOL(s,v) do { if (s == -1) { s = v; } } while(0)
89

910
void prepare_repo_settings(struct repository *r)
1011
{
11-
int value;
12+
int value, feature_many_files = 0;
1213
char *strval;
1314

1415
if (r->settings.initialized)
@@ -62,6 +63,7 @@ void prepare_repo_settings(struct repository *r)
6263
UPDATE_DEFAULT_BOOL(r->settings.core_multi_pack_index, 1);
6364

6465
if (!repo_config_get_bool(r, "feature.manyfiles", &value) && value) {
66+
feature_many_files = 1;
6567
UPDATE_DEFAULT_BOOL(r->settings.index_version, 4);
6668
UPDATE_DEFAULT_BOOL(r->settings.core_untracked_cache, UNTRACKED_CACHE_WRITE);
6769
}
@@ -70,8 +72,11 @@ void prepare_repo_settings(struct repository *r)
7072
r->settings.fetch_write_commit_graph = value;
7173
UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 0);
7274

73-
if (!repo_config_get_bool(r, "feature.experimental", &value) && value)
75+
if (!repo_config_get_bool(r, "feature.experimental", &value) && value) {
7476
UPDATE_DEFAULT_BOOL(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);
77+
if (feature_many_files && fsmonitor_ipc__is_supported())
78+
fsm_settings__set_ipc(r);
79+
}
7580

7681
/* Hack for test programs like test-dump-untracked-cache */
7782
if (ignore_untracked_cache_config)

0 commit comments

Comments
 (0)