@@ -16,9 +16,11 @@ SYNOPSIS
1616 [--chmod=(+|-)x]
1717 [--[no-]assume-unchanged]
1818 [--[no-]skip-worktree]
19+ [--[no-]fsmonitor-valid]
1920 [--ignore-submodules]
2021 [--[no-]split-index]
2122 [--[no-|test-|force-]untracked-cache]
23+ [--[no-]fsmonitor]
2224 [--really-refresh] [--unresolve] [--again | -g]
2325 [--info-only] [--index-info]
2426 [-z] [--stdin] [--index-version <n>]
@@ -111,6 +113,12 @@ you will need to handle the situation manually.
111113 set and unset the "skip-worktree" bit for the paths. See
112114 section "Skip-worktree bit" below for more information.
113115
116+ --[no-]fsmonitor-valid::
117+ When one of these flags is specified, the object name recorded
118+ for the paths are not updated. Instead, these options
119+ set and unset the "fsmonitor valid" bit for the paths. See
120+ section "File System Monitor" below for more information.
121+
114122-g::
115123--again::
116124 Runs 'git update-index' itself on the paths whose index
@@ -201,6 +209,15 @@ will remove the intended effect of the option.
201209 `--untracked-cache` used to imply `--test-untracked-cache` but
202210 this option would enable the extension unconditionally.
203211
212+ --fsmonitor::
213+ --no-fsmonitor::
214+ Enable or disable files system monitor feature. These options
215+ take effect whatever the value of the `core.fsmonitor`
216+ configuration variable (see linkgit:git-config[1]). But a warning
217+ is emitted when the change goes against the configured value, as
218+ the configured value will take effect next time the index is
219+ read and this will remove the intended effect of the option.
220+
204221\--::
205222 Do not interpret any more arguments as options.
206223
@@ -447,6 +464,34 @@ command reads the index; while when `--[no-|force-]untracked-cache`
447464are used, the untracked cache is immediately added to or removed from
448465the index.
449466
467+ File System Monitor
468+ -------------------
469+
470+ This feature is intended to speed up git operations for repos that have
471+ large working directories.
472+
473+ It enables git to work together with a file system monitor (see the
474+ "fsmonitor-watchman" section of linkgit:githooks[5]) that can
475+ inform it as to what files have been modified. This enables git to avoid
476+ having to lstat() every file to find modified files.
477+
478+ When used in conjunction with the untracked cache, it can further improve
479+ performance by avoiding the cost of scanning the entire working directory
480+ looking for new files.
481+
482+ If you want to enable (or disable) this feature, it is easier to use
483+ the `core.fsmonitor` configuration variable (see
484+ linkgit:git-config[1]) than using the `--fsmonitor` option to
485+ `git update-index` in each repository, especially if you want to do so
486+ across all repositories you use, because you can set the configuration
487+ variable to `true` (or `false`) in your `$HOME/.gitconfig` just once
488+ and have it affect all repositories you touch.
489+
490+ When the `core.fsmonitor` configuration variable is changed, the
491+ file system monitor is added to or removed from the index the next time
492+ a command reads the index. When `--[no-]fsmonitor` are used, the file
493+ system monitor is immediately added to or removed from the index.
494+
450495Configuration
451496-------------
452497
0 commit comments