diff mbox series

[12/12] fsmonitor: update doc for Linux

Message ID 77ed35b3b80de9ecfea179357115428ab89d9864.1665326258.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series fsmonitor: Implement fsmonitor for Linux | expand

Commit Message

Eric DeCosta Oct. 9, 2022, 2:37 p.m. UTC
From: Eric DeCosta <edecosta@mathworks.com>

Update the documentation for Linux.

Signed-off-by: Eric DeCosta <edecosta@mathworks.com>
---
 Documentation/config/fsmonitor--daemon.txt |  4 ++--
 Documentation/git-fsmonitor--daemon.txt    | 24 ++++++++++++++--------
 2 files changed, 18 insertions(+), 10 deletions(-)

Comments

Ævar Arnfjörð Bjarmason Oct. 18, 2022, 12:43 p.m. UTC | #1
On Sun, Oct 09 2022, Eric DeCosta via GitGitGadget wrote:

> From: Eric DeCosta <edecosta@mathworks.com>
>
> Update the documentation for Linux.
>
> Signed-off-by: Eric DeCosta <edecosta@mathworks.com>
> ---
>  Documentation/config/fsmonitor--daemon.txt |  4 ++--
>  Documentation/git-fsmonitor--daemon.txt    | 24 ++++++++++++++--------
>  2 files changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/config/fsmonitor--daemon.txt b/Documentation/config/fsmonitor--daemon.txt
> index c225c6c9e74..2cafb040d96 100644
> --- a/Documentation/config/fsmonitor--daemon.txt
> +++ b/Documentation/config/fsmonitor--daemon.txt
> @@ -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`.

I think this should be squashed into the relevant commit(s) when we
start supporting this fsmonitor.socketDir for that platform.

But on the content: Shouldn't we just reword this to say something like
"*nix"-specific, we only have one platform which is likely to not have
"sockets", i.e. Windows, no?

So rather than having an ever growing list of OS's that'll inevitably
grow to something like:

	Mac OS, Linux, FreeBSD, NetBSD, OpenBSD, GNU/Hurd-specific
	option, if set...

Let's find some way to refer to the platforms we do support, and instead
mention the only one we don't support sockets on?

> diff --git a/Documentation/git-fsmonitor--daemon.txt b/Documentation/git-fsmonitor--daemon.txt
> index 8238eadb0e1..c2b08229c74 100644
> --- a/Documentation/git-fsmonitor--daemon.txt
> +++ b/Documentation/git-fsmonitor--daemon.txt
> @@ -76,23 +76,31 @@ repositories; this may be overridden by setting `fsmonitor.allowRemote` to
>  correctly with all network-mounted repositories and 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

Ditto.
diff mbox series

Patch

diff --git a/Documentation/config/fsmonitor--daemon.txt b/Documentation/config/fsmonitor--daemon.txt
index c225c6c9e74..2cafb040d96 100644
--- a/Documentation/config/fsmonitor--daemon.txt
+++ b/Documentation/config/fsmonitor--daemon.txt
@@ -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`.
diff --git a/Documentation/git-fsmonitor--daemon.txt b/Documentation/git-fsmonitor--daemon.txt
index 8238eadb0e1..c2b08229c74 100644
--- a/Documentation/git-fsmonitor--daemon.txt
+++ b/Documentation/git-fsmonitor--daemon.txt
@@ -76,23 +76,31 @@  repositories; this may be overridden by setting `fsmonitor.allowRemote` to
 correctly with all network-mounted repositories and 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 be 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
+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
 -------------