@@ -1214,14 +1214,14 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
}
if (fsmonitor > 0) {
- if (git_config_get_fsmonitor() == 0)
+ if (repo_config_get_fsmonitor(r) == 0)
warning(_("core.fsmonitor is unset; "
"set it if you really want to "
"enable fsmonitor"));
add_fsmonitor(&the_index);
report(_("fsmonitor enabled"));
} else if (!fsmonitor) {
- if (git_config_get_fsmonitor() == 1)
+ if (repo_config_get_fsmonitor(r) == 1)
warning(_("core.fsmonitor is set; "
"remove it if you really want to "
"disable fsmonitor"));
@@ -2499,9 +2499,9 @@ int git_config_get_max_percent_split_change(void)
return -1; /* default value */
}
-int git_config_get_fsmonitor(void)
+int repo_config_get_fsmonitor(struct repository *r)
{
- if (git_config_get_pathname("core.fsmonitor", &core_fsmonitor))
+ if (repo_config_get_pathname(r, "core.fsmonitor", &core_fsmonitor))
core_fsmonitor = getenv("GIT_TEST_FSMONITOR");
if (core_fsmonitor && !*core_fsmonitor)
@@ -607,7 +607,7 @@ int git_config_get_index_threads(int *dest);
int git_config_get_untracked_cache(void);
int git_config_get_split_index(void);
int git_config_get_max_percent_split_change(void);
-int git_config_get_fsmonitor(void);
+int repo_config_get_fsmonitor(struct repository *r);
/* This dies if the configured or default date is in the future */
int git_config_get_expiry(const char *key, const char **output);
@@ -411,7 +411,7 @@ void remove_fsmonitor(struct index_state *istate)
void tweak_fsmonitor(struct index_state *istate)
{
unsigned int i;
- int fsmonitor_enabled = git_config_get_fsmonitor();
+ int fsmonitor_enabled = repo_config_get_fsmonitor(istate->repo ? istate->repo : the_repository);
if (istate->fsmonitor_dirty) {
if (fsmonitor_enabled) {