git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Issue when using the fsmonitor-watchman hook?

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Apr 10, 2022, 18:21 UTC
Message-ID
<3ce82619-6305-69b6-b4e5-bbbc91c17530@gmail.com>
Hi all,

I recently installed v2.36.0-rc1 and started getting the warning about the deprecation of core.useBuiltinFSMonitor configuration. It appeared for each 'git' invocation which was a bit annoying. Fortunately, I had some spare time so I went the route of actually applying the suggested alternative rather than suppressing the warning.

According to the git-hooks documentation, I configured core.fsmonitor to '.git/hooks/fsmonitor-watchman' and after that for some reason all the styles in the terminal seems to have gone awry (I use Windows Terminal with PowerShell 7). A sample demonstration.

This is how the terminal should've looked (it appears with appropriate colours):

   04-10 23:36:38 D:\Source\kaartic\git [(f2817c1...) +2 ~0 -0 !]
 >

After setting the config the following is how it got rendered (without colours):

←[95m04-10 23:36:20 ←[0mD:\Source\kaartic\the-wallet 
←[93m[←[0m←[96mmaster←[0m←[96m ≡←[0m←[31m←[49m +1←[0m←[31m←[49m 
~0←[0m←[31m←[49m -0←[0m←[31m !←[0m←[93m]←[0m
 > cd ..\git\

I should note that I use posh-git [2] plug-in for the colourized Git metadata info in the terminal.

Also, I got the following error messages when running 'git status'
 > git status
open2: exec of watchman -j --no-pretty failed: No such file or directory 
at .git/hooks/fsmonitor-watchman line 78.
Unsupported query-fsmonitor hook version '1'.
Falling back to scanning...
On branch master
Your branch is up to date with 'origin/master'.
...

It's clear that I'm doing something wrong. I'm not sure what, though. The fact that I have no clear idea about what the fsmonitor-watchman hook does, does not help at all. It would be great if someone could help me understand what I got wrong :)

[1]: https://git-scm.com/docs/githooks#_fsmonitor_watchman [2]: https://github.com/dahlbyk/posh-git

-- 
Sivaraam
Next: Derrick Stolee
Message 1 of 3 in “Issue when using the fsmonitor-watchman hook?”
  1. Kaartic SivaraamApr 10, 2022
  2. Derrick StoleeApr 11, 2022
  3. Kaartic SivaraamApr 12, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.