Skip to content

Commit 00388b6

Browse files
Merge pull request #3783: 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.
2 parents 48a6fa9 + 0231a90 commit 00388b6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fsmonitor-settings.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,24 @@ static int check_for_incompatible(struct repository *r)
5050

5151
static int check_deprecated_builtin_config(struct repository *r)
5252
{
53-
int core_use_builtin_fsmonitor;
53+
int core_use_builtin_fsmonitor = 0;
5454

5555
/*
5656
* If 'core.useBuiltinFSMonitor' is set, print a deprecation warning
5757
* suggesting the use of 'core.fsmonitor' instead. If the config is
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)