threads / discuss / 57802

use core.fsmonitor instead

Subject: use core.fsmonitor instead

## tl;dr

3 messages between Apr 26, 2022 and Apr 27, 2022.

replies: 2people: 3as markdown or json

David Calkins· Apr 26, 2022, 22:43 UTC · lore

I installed Git v2.36.0 for Windows (64-bit) and when running commands I get the following output.

hint: core.useBuiltinFSMonitor will be deprecated soon; use core.fsmonitor instead hint: Disable this message with "git config advice.useCoreFSMonitorConfig false"

I opened the system Git config file and updated it to have the below.
 useBuiltinFSMonitor = false

After this change I no longer get that output. However, the hint indicated that I should "use core.fsmonitor instead". Is there something else I should be doing besides just telling it not to useBuildtinFSMonitor? How do I tell it to "use core.fsmonitor instead"?

Junio C Hamano· Apr 26, 2022, 23:40 UTC · re: David Calkins · lore

Re: use core.fsmonitor instead

David Calkins <david.s.calkins@gmail.com> writes:
Show 16 quoted lines
> I installed Git v2.36.0 for Windows (64-bit) and when running commands
> I get the following output.
>
> hint: core.useBuiltinFSMonitor will be deprecated soon; use
> core.fsmonitor instead
> hint: Disable this message with "git config advice.useCoreFSMonitorConfig false"
>
> I opened the system Git config file and updated it to have the below.
>
>  useBuiltinFSMonitor = false
>
> After this change I no longer get that output.  However, the hint
> indicated that I should "use core.fsmonitor instead".  Is there
> something else I should be doing besides just telling it not to
> useBuildtinFSMonitor?  How do I tell it to "use core.fsmonitor
> instead"?

I do not do Windows, and I believe this is one area their codebase deviates from what I have in my tree (read: Git for Windows is a bit ahead of the real Git), so I have to speak with some speculation, but the above does look a poor end-user experience. If the code detected core.useBuildtinFSMonitor is set to true, it should have suggested to set core.fsmonitor to true instead, not just leaving at "use X instead" without telling how to use X.

I am speculating that the old way (on Windows) to use the built-in fsmonitor code was

    git config core.useBuiltinFSMonitor true

(this is something existed only in Git for Windows). But the latest incantation to ask for the built-in fsmonitor is to say

    git config core.fsmonitor true

on platforms that support builtin fsmonitor. I think that is what the message is trying to tell you.

It looks also like a very poor design to give hint tied to an advice variable in this case. They used to use core.usebuiltinfsmonitor and they are trying to migrate their users away to use core.fsmonitor variable instead, so they could just have tied the advice messages to core.fsmonitor variable. If they see that core.usebuiltinfsmonitor is still used, and if they see core.fsmonitor also is set (even to 'false'), then they know the user has migrated, so they can stay quiet without forcing the user to set advice.* configuration variable. If they do not see core.fsmonitor set to anything but core.usebuiltinfsmonitor used, then they can complain. There shouldn't be a need to use the advice.usecorefsmonitorconfig variable at all, as far as I see, and that makes this end-user experience doubly bad.

Jeff Hostetler· Apr 27, 2022, 20:41 UTC · re: David Calkins · lore

Re: use core.fsmonitor instead

On 4/26/22 6:43 PM, David Calkins wrote:
Show 17 quoted lines
> I installed Git v2.36.0 for Windows (64-bit) and when running commands
> I get the following output.
> 
> hint: core.useBuiltinFSMonitor will be deprecated soon; use
> core.fsmonitor instead
> hint: Disable this message with "git config advice.useCoreFSMonitorConfig false"
> 
> I opened the system Git config file and updated it to have the below.
> 
>   useBuiltinFSMonitor = false
> 
> After this change I no longer get that output.  However, the hint
> indicated that I should "use core.fsmonitor instead".  Is there
> something else I should be doing besides just telling it not to
> useBuildtinFSMonitor?  How do I tell it to "use core.fsmonitor
> instead"?
> 
Yes, the wording of that message could use some work.

Git for Windows 2.34 and 2.35 included an experimental version of the builtin FSMonitor feature that was centered around `core.useBuiltinFSMonitor`. We are in the process of upstreaming the FSMonitor feature into core Git. The first half of it is included in core Git 2.36 and centered around the `core.fsmonitor` config variable instead of the former config variable. Git for Windows 2.36 recognizes both config variables, but warns that the former is deprecated.

Setting
	git config core.fsmonitor true
will quiet the warning.

We are phasing out the old config variable as soon as we can retire the "experimental" label from the feature in GFW, but felt that we could not just delete it and switch because Windows users sometimes have more than one version of Git installed. For example, VS ships with a hidden version that may be ahead or behind the version you have installed explicitly in Program Files.

If you know that you only have one version of Git installed, you can unset the old config value. But if you have more than one, leave both set to true.

Sorry for the confusion. Jeff

← back to recent threads