Skip to content

Commit

Permalink
fsmonitor: update doc for Linux
Browse files Browse the repository at this point in the history
Update the documentation for Linux.
  • Loading branch information
edecosta-mw authored and Marzi1904 committed Feb 6, 2024
1 parent 0f78692 commit 4b9e4b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Documentation/config/fsmonitor--daemon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ fsmonitor.allowRemote::
behavior. Only respected when `core.fsmonitor` is set to `true`.

fsmonitor.socketDir::
This Mac OS-specific option, if set, specifies the directory in
Mac OS and Linux-specific option. If set, specifies the directory in
which to create the Unix domain socket used for communication
between the fsmonitor daemon and various Git commands. The directory must
reside on a native Mac OS filesystem. Only respected when `core.fsmonitor`
reside on a native filesystem. Only respected when `core.fsmonitor`
is set to `true`.
26 changes: 17 additions & 9 deletions Documentation/git-fsmonitor--daemon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,31 @@ repositories; this may be overridden by setting `fsmonitor.allowRemote` to
correctly with all network-mounted repositories, so such use is considered
experimental.

On Mac OS, the inter-process communication (IPC) between various Git
On Linux and Mac OS, the inter-process communication (IPC) between various Git
commands and the fsmonitor daemon is done via a Unix domain socket (UDS) -- a
special type of file -- which is supported by native Mac OS filesystems,
but not on network-mounted filesystems, NTFS, or FAT32. Other filesystems
may or may not have the needed support; the fsmonitor daemon is not guaranteed
to work with these filesystems and such use is considered experimental.
special type of file -- which is supported by many native Linux and Mac OS
filesystems, but not on network-mounted filesystems, NTFS, or FAT32. Other
filesystems may or may not have the needed support; the fsmonitor daemon is not
guaranteed to work with these filesystems and such use is considered
experimental.

By default, the socket is created in the `.git` directory. However, if the
`.git` directory is on a network-mounted filesystem, it will instead be
created at `$HOME/.git-fsmonitor-*` unless `$HOME` itself is on a
network-mounted filesystem, in which case you must set the configuration
variable `fsmonitor.socketDir` to the path of a directory on a Mac OS native
network-mounted filesystem in which case you must set the configuration
variable `fsmonitor.socketDir` to the path of a directory on a native
filesystem in which to create the socket file.

If none of the above directories (`.git`, `$HOME`, or `fsmonitor.socketDir`)
is on a native Mac OS file filesystem the fsmonitor daemon will report an
error that will cause the daemon and the currently running command to exit.
is on a native Linux or Mac OS filesystem the fsmonitor daemon will report
an error that will cause the daemon to exit and the currently running command
to issue a warning.

On Linux, the fsmonitor daemon registers a watch for each directory in the
repository. The default per-user limit for the number of watches on most Linux
systems is 8192. This may not be sufficient for large repositories or if
multiple instances of the fsmonitor daemon are running.
See https://watchexec.github.io/docs/inotify-limits.html[Linux inotify limits] for more information.

CONFIGURATION
-------------
Expand Down

0 comments on commit 4b9e4b9

Please sign in to comment.