Home Explore Blog CI



git

2nd chunk of `Documentation/config/core.adoc`
18d5e969003e35cd96ac26b42b8ccd42bd2464ae71be59650000000100000fa1
 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 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
	working tree are ignored; useful when the inode change time
	is regularly modified by something outside Git (file system
	crawlers and some backup systems).
	See linkgit:git-update-index[1]. True by default.

core.splitIndex::
	If true, the split-index feature of the index will be used.
	See linkgit:git-update-index[1]. False by default.

core.untrackedCache::
	Determines what to do about the untracked cache feature of the
	index. It will be kept, if this variable is unset or set to
	`keep`. It will automatically be added if set to `true`. And
	it will automatically be removed, if set to `false`. Before
	setting it to `true`, you should check that mtime is working
	properly on your system.
	See linkgit:git-update-index[1]. `keep` by default, unless
	`feature.manyFiles` is enabled which sets this setting to
	`true` by default.

core.checkStat::
	When missing or is set to `default`, many fields in the stat
	structure are checked to detect if a file has been modified
	since Git looked at it.  When this configuration variable is
	set to `minimal`, sub-second part of mtime and ctime, the
	uid and gid of the owner of the file, the inode number (and
	the device number, if Git was compiled to use it), are
	excluded from the check among these fields, leaving only the
	whole-second part of mtime (and ctime, if `core.trustCtime`
	is set) and the filesize to be checked.
+
There are implementations of Git that do not leave usable values in
some fields (e.g. JGit); by excluding these fields from the
comparison, the `minimal` mode may help interoperability when the
same repository is used by these other systems at the same time.

core.quotePath::
	Commands that output paths (e.g. 'ls-files', 'diff'), will
	quote "unusual" characters in the pathname by enclosing the
	pathname in double-quotes and escaping those characters with
	backslashes in the same way C escapes control characters

Title: Git Core Configuration Variables
Summary
This section continues to describe various Git core configuration variables, including file system monitoring, hook protocols, trust of ctime, split-index, untracked cache, stat checking, and path quoting, which can be used to customize Git's behavior and improve performance and interoperability in different environments.