Skip to content

Commit 9bf5d4c

Browse files
committed
config.txt: clarify core.checkStat
The description of this key does not really tell what the 'minimal' mode checks and does not check. The description for the 'default' mode is not much better and just says 'all fields', which is unclear and is not even correct (e.g. we do not look at 'atime'). Spell out what are and what are not checked under the 'minimal' mode relative to the 'default' mode to help those who want to decide if they want to use the 'minimal' mode, also taking information about this mode from the commit message of c08e4d5 (Enable minimal stat checking - 2013-01-22). Helped-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 53f9a3e commit 9bf5d4c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Documentation/config.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,20 @@ core.untrackedCache::
449449
See linkgit:git-update-index[1]. `keep` by default.
450450

451451
core.checkStat::
452-
Determines which stat fields to match between the index
453-
and work tree. The user can set this to 'default' or
454-
'minimal'. Default (or explicitly 'default'), is to check
455-
all fields, including the sub-second part of mtime and ctime.
452+
When missing or is set to `default`, many fields in the stat
453+
structure are checked to detect if a file has been modified
454+
since Git looked at it. When this configuration variable is
455+
set to `minimal`, sub-second part of mtime and ctime, the
456+
uid and gid of the owner of the file, the inode number (and
457+
the device number, if Git was compiled to use it), are
458+
excluded from the check among these fields, leaving only the
459+
whole-second part of mtime (and ctime, if `core.trustCtime`
460+
is set) and the filesize to be checked.
461+
+
462+
There are implementations of Git that do not leave usable values in
463+
some fields (e.g. JGit); by excluding these fields from the
464+
comparison, the `minimal` mode may help interoperability when the
465+
same repository is used by these other systems at the same time.
456466

457467
core.quotePath::
458468
Commands that output paths (e.g. 'ls-files', 'diff'), will

0 commit comments

Comments
 (0)