summaryrefslogtreecommitdiff
path: root/Documentation/config
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2022-03-25 18:02:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-25 23:04:15 (GMT)
commit3248486920d0bfc5584747dc7af8414d05282191 (patch)
tree52ae1fddb291e636059de820b6c7be656e77cd11 /Documentation/config
parent9c307e8afd930485a8409cadf8cc7065512d9845 (diff)
downloadgit-3248486920d0bfc5584747dc7af8414d05282191.zip
git-3248486920d0bfc5584747dc7af8414d05282191.tar.gz
git-3248486920d0bfc5584747dc7af8414d05282191.tar.bz2
fsmonitor: document builtin fsmonitor
Document how `core.fsmonitor` can be set to a boolean to enable or disable the builtin FSMonitor. Update references to `core.fsmonitor` and `core.fsmonitorHookVersion` and pointers to `Watchman` to refer to it. Create `git-fsmonitor--daemon` manual page and describe its features. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config')
-rw-r--r--Documentation/config/core.txt60
1 files changed, 46 insertions, 14 deletions
diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
index c04f62a..6303c36 100644
--- a/Documentation/config/core.txt
+++ b/Documentation/config/core.txt
@@ -62,22 +62,54 @@ core.protectNTFS::
Defaults to `true` on Windows, and `false` elsewhere.
core.fsmonitor::
- If set, the value of this variable is used as a command which
- will identify all files that may have changed since the
- requested date/time. This information is used to speed up git by
- avoiding unnecessary processing of files that have not changed.
- See the "fsmonitor-watchman" section of linkgit:githooks[5].
+ If set to true, enable the built-in file system monitor
+ daemon for this working directory (linkgit:git-fsmonitor--daemon[1]).
++
+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.
++
+The built-in file system monitor is currently available only on a
+limited set of supported platforms. Currently, this includes Windows
+and MacOS.
++
+ Otherwise, this variable contains the pathname of the "fsmonitor"
+ hook command.
++
+This hook command is used to identify all files that may have changed
+since the requested date/time. This information is used to speed up
+git by avoiding unnecessary scanning of files that have not changed.
++
+See the "fsmonitor-watchman" section of linkgit:githooks[5].
++
+Note that if you concurrently use multiple versions of Git, such
+as one version on the command line and another version in an IDE
+tool, that the definition of `core.fsmonitor` was extended to
+allow boolean values in addition to hook pathnames. Git versions
+2.35.1 and prior will not understand the boolean values and will
+consider the "true" or "false" values as hook pathnames to be
+invoked. Git versions 2.26 thru 2.35.1 default to hook protocol
+V2 and will fall back to no fsmonitor (full scan). Git versions
+prior to 2.26 default to hook protocol V1 and will silently
+assume there were no changes to report (no scan), so status
+commands may report incomplete results. For this reason, it is
+best to upgrade all of your Git versions before using the built-in
+file system monitor.
core.fsmonitorHookVersion::
- Sets the version of hook that is to be used when calling fsmonitor.
- There are currently versions 1 and 2. When this is not set,
- version 2 will be tried first and if it fails then version 1
- will be tried. Version 1 uses a timestamp as input to determine
- which files have changes since that time but some monitors
- like watchman have race conditions when used with a timestamp.
- Version 2 uses an opaque string so that the monitor can return
- something that can be used to determine what files have changed
- without race conditions.
+ Sets the protocol version to be used when invoking the
+ "fsmonitor" hook.
++
+There are currently versions 1 and 2. When this is not set,
+version 2 will be tried first and if it fails then version 1
+will be tried. Version 1 uses a timestamp as input to determine
+which files have changes since that time but some monitors
+like Watchman have race conditions when used with a timestamp.
+Version 2 uses an opaque string so that the monitor can return
+something that can be used to determine what files have changed
+without race conditions.
core.trustctime::
If false, the ctime differences between the index and the