Skip to content

Commit e5a2b9c

Browse files
committed
fixup! fsmonitor: reintroduce core.useBuiltinFSMonitor
This change to warn about core.useBuiltinFSMonitor is a good one, but it is too aggressive. If a user has set core.useBuiltinFSMonitor=false, then that warning shows up. Perhaps there is value in warning users that their explicit disabling of the feature will stop working. However, VFS for Git does this assignment, so all users on those enlistments will start getting warnings after upgrading Git. This situation is probably much more likely than a typical user disabling the experimental feature themselves. Putting in this fix is easier than rereleasing VFS for Git. Signed-off-by: Derrick Stolee <derrickstolee@github.com>
1 parent 48a6fa9 commit e5a2b9c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fsmonitor-settings.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,16 @@ static int check_deprecated_builtin_config(struct repository *r)
5858
* set to true, set the appropriate mode and return 1 indicating that
5959
* the check resulted the config being set by this (deprecated) setting.
6060
*/
61-
if(!repo_config_get_bool(r, "core.useBuiltinFSMonitor", &core_use_builtin_fsmonitor)) {
61+
if(!repo_config_get_bool(r, "core.useBuiltinFSMonitor", &core_use_builtin_fsmonitor) &&
62+
core_use_builtin_fsmonitor) {
6263
if (!git_env_bool("GIT_SUPPRESS_USEBUILTINFSMONITOR_ADVICE", 0)) {
6364
advise_if_enabled(ADVICE_USE_CORE_FSMONITOR_CONFIG,
6465
_("core.useBuiltinFSMonitor will be deprecated "
6566
"soon; use core.fsmonitor instead"));
6667
setenv("GIT_SUPPRESS_USEBUILTINFSMONITOR_ADVICE", "1", 1);
6768
}
68-
if (core_use_builtin_fsmonitor) {
69-
fsm_settings__set_ipc(r);
70-
return 1;
71-
}
69+
fsm_settings__set_ipc(r);
70+
return 1;
7271
}
7372

7473
return 0;

0 commit comments

Comments
 (0)