]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-fsmonitor--daemon.txt
Merge branch 'jc/unleak-core-excludesfile'
[thirdparty/git.git] / Documentation / git-fsmonitor--daemon.txt
CommitLineData
f3ea4bed
TZ
1git-fsmonitor{litdd}daemon(1)
2=============================
32484869
JH
3
4NAME
5----
5aa9e326 6git-fsmonitor--daemon - A Built-in Filesystem Monitor
32484869
JH
7
8SYNOPSIS
9--------
10[verse]
f3ea4bed
TZ
11'git fsmonitor{litdd}daemon' start
12'git fsmonitor{litdd}daemon' run
13'git fsmonitor{litdd}daemon' stop
14'git fsmonitor{litdd}daemon' status
32484869
JH
15
16DESCRIPTION
17-----------
18
19A daemon to watch the working directory for file and directory
5aa9e326 20changes using platform-specific filesystem notification facilities.
32484869
JH
21
22This daemon communicates directly with commands like `git status`
23using the link:technical/api-simple-ipc.html[simple IPC] interface
24instead of the slower linkgit:githooks[5] interface.
25
26This daemon is built into Git so that no third-party tools are
27required.
28
29OPTIONS
30-------
31
32start::
33 Starts a daemon in the background.
34
35run::
36 Runs a daemon in the foreground.
37
38stop::
39 Stops the daemon running in the current working
40 directory, if present.
41
42status::
43 Exits with zero status if a daemon is watching the
44 current working directory.
45
46REMARKS
47-------
48
49This daemon is a long running process used to watch a single working
50directory and maintain a list of the recently changed files and
51directories. Performance of commands such as `git status` can be
52increased if they just ask for a summary of changes to the working
53directory and can avoid scanning the disk.
54
55When `core.fsmonitor` is set to `true` (see linkgit:git-config[1])
56commands, such as `git status`, will ask the daemon for changes and
57automatically start it (if necessary).
58
59For more information see the "File System Monitor" section in
60linkgit:git-update-index[1].
61
62CAVEATS
63-------
64
65The fsmonitor daemon does not currently know about submodules and does
5aa9e326 66not know to filter out filesystem events that happen within a
32484869
JH
67submodule. If fsmonitor daemon is watching a super repo and a file is
68modified within the working directory of a submodule, it will report
69the change (as happening against the super repo). However, the client
70will properly ignore these extra events, so performance may be affected
71but it will not cause an incorrect result.
72
9a9fd289 73By default, the fsmonitor daemon refuses to work with network-mounted
5aa9e326
ED
74repositories; this may be overridden by setting `fsmonitor.allowRemote` to
75`true`. Note, however, that the fsmonitor daemon is not guaranteed to work
4d542687 76correctly with all network-mounted repositories, so such use is considered
5aa9e326
ED
77experimental.
78
79On Mac OS, the inter-process communication (IPC) between various Git
80commands and the fsmonitor daemon is done via a Unix domain socket (UDS) -- a
81special type of file -- which is supported by native Mac OS filesystems,
82but not on network-mounted filesystems, NTFS, or FAT32. Other filesystems
83may or may not have the needed support; the fsmonitor daemon is not guaranteed
84to work with these filesystems and such use is considered experimental.
85
f4e1851a 86By default, the socket is created in the `.git` directory. However, if the
859a6d60 87`.git` directory is on a network-mounted filesystem, it will instead be
5aa9e326 88created at `$HOME/.git-fsmonitor-*` unless `$HOME` itself is on a
4d542687 89network-mounted filesystem, in which case you must set the configuration
5aa9e326
ED
90variable `fsmonitor.socketDir` to the path of a directory on a Mac OS native
91filesystem in which to create the socket file.
92
93If none of the above directories (`.git`, `$HOME`, or `fsmonitor.socketDir`)
94is on a native Mac OS file filesystem the fsmonitor daemon will report an
95error that will cause the daemon and the currently running command to exit.
96
97CONFIGURATION
98-------------
99
100include::includes/cmd-config-section-all.txt[]
101
102include::config/fsmonitor--daemon.txt[]
103
32484869
JH
104GIT
105---
106Part of the linkgit:git[1] suite