Skip to content

Commit db923ea

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: Johannes Schindelin <[email protected]>
1 parent 17a284d commit db923ea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

repo-settings.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
void prepare_repo_settings(struct repository *r)
99
{
10-
int value;
10+
int value, feature_many_files = 0;
1111
char *strval;
1212

1313
if (r->settings.initialized)
@@ -62,6 +62,7 @@ void prepare_repo_settings(struct repository *r)
6262
r->settings.use_builtin_fsmonitor = 1;
6363

6464
if (!repo_config_get_bool(r, "feature.manyfiles", &value) && value) {
65+
feature_many_files = 1;
6566
UPDATE_DEFAULT_BOOL(r->settings.index_version, 4);
6667
UPDATE_DEFAULT_BOOL(r->settings.core_untracked_cache, UNTRACKED_CACHE_WRITE);
6768
}
@@ -70,8 +71,11 @@ void prepare_repo_settings(struct repository *r)
7071
r->settings.fetch_write_commit_graph = value;
7172
UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 0);
7273

73-
if (!repo_config_get_bool(r, "feature.experimental", &value) && value)
74+
if (!repo_config_get_bool(r, "feature.experimental", &value) && value) {
7475
UPDATE_DEFAULT_BOOL(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);
76+
if (feature_many_files)
77+
UPDATE_DEFAULT_BOOL(r->settings.use_builtin_fsmonitor, 1);
78+
}
7579

7680
/* Hack for test programs like test-dump-untracked-cache */
7781
if (ignore_untracked_cache_config)

0 commit comments

Comments
 (0)