mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-16 02:26:21 -05:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
#include "config.h"
|
||||
#include "repository.h"
|
||||
#include "midx.h"
|
||||
#include "fsmonitor-ipc.h"
|
||||
|
||||
#define UPDATE_DEFAULT_BOOL(s,v) do { if (s == -1) { s = v; } } while(0)
|
||||
|
||||
void prepare_repo_settings(struct repository *r)
|
||||
{
|
||||
int value;
|
||||
int value, feature_many_files = 0;
|
||||
char *strval;
|
||||
|
||||
if (r->settings.initialized)
|
||||
@@ -62,6 +63,7 @@ void prepare_repo_settings(struct repository *r)
|
||||
r->settings.use_builtin_fsmonitor = 1;
|
||||
|
||||
if (!repo_config_get_bool(r, "feature.manyfiles", &value) && value) {
|
||||
feature_many_files = 1;
|
||||
UPDATE_DEFAULT_BOOL(r->settings.index_version, 4);
|
||||
UPDATE_DEFAULT_BOOL(r->settings.core_untracked_cache, UNTRACKED_CACHE_WRITE);
|
||||
}
|
||||
@@ -70,8 +72,12 @@ void prepare_repo_settings(struct repository *r)
|
||||
r->settings.fetch_write_commit_graph = value;
|
||||
UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 0);
|
||||
|
||||
if (!repo_config_get_bool(r, "feature.experimental", &value) && value)
|
||||
if (!repo_config_get_bool(r, "feature.experimental", &value) && value) {
|
||||
UPDATE_DEFAULT_BOOL(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);
|
||||
if (feature_many_files && fsmonitor_ipc__is_supported())
|
||||
UPDATE_DEFAULT_BOOL(r->settings.use_builtin_fsmonitor,
|
||||
1);
|
||||
}
|
||||
|
||||
/* Hack for test programs like test-dump-untracked-cache */
|
||||
if (ignore_untracked_cache_config)
|
||||
|
||||
Reference in New Issue
Block a user