Home > OS >  Receiving "core.useBuiltinFSMonitor will be deprecated soon" message while cloning in Git
Receiving "core.useBuiltinFSMonitor will be deprecated soon" message while cloning in Git

Time:05-05

I recently installed git version 2.36.0.windows.1 and upon cloning a repo I got the following messages after.

hint: core.useBuiltinFSMonitor will be deprecated soon; use core.fsmonitor instead

hint: Disable this message with "git config advice.useCoreFSMonitorConfig false"

Changing the value to false does disable the message.

My questions are:

  1. What are core.useBuiltinFSMonitor and core.fsmonitor ?
  2. Considering I just installed Git, why isn't the value auto set to false rather than ask the user to do so?

Thanks!

CodePudding user response:

The release notes for Git for Windows 2.30.2 (March, 2021) offer some clues:

Git for Windows now ships with an experimental built-in file-system monitor, without the need to install Watchman and setting core.fsmonitor. It can be turned on by setting both feature.manyFiles=true and feature.experimental=true (or directly, via core.useBuiltinFSMonitor=true).

core.useBuiltinFSMonitor is not documented on the Git website, even on an older version where it should exist, but it appears to have been a setting to enable the built-in filesystem monitor for users who want to live on the bleeding edge.

The hints you quote in your question suggest that this feature is now considered stable enough to be the default. Indeed, if we look at the documentation for core.fsmonitor, we see that this is the case¹:

If set to true, enable the built-in file system monitor daemon for this working directory

(The older documentation reveals that this setting did exist prior to this change, but it was used for pointing to an external command to use as a monitor.)

The documentation also explains why we might want a filesystem monitor in the first place, and why a built-in monitor is preferable:

Like hook-based file system monitors, the built-in file system monitor can speed up Git commands that need to refresh the Git index (e.g. git status) in a working directory with many files. The built-in monitor eliminates the need to install and maintain an external third-party tool.

As to why you're getting this warning when you clone, I'm not sure. Did you already have a global .gitconfig file in your home directory? Possibly one that your employer ships as part of a default configuration?


¹At the time of writing, this feature is documented to be available only on Windows and macOS.

CodePudding user response:

Write in the terminal: git config core.fsmonitor true

  • Related