fsmonitor: relocate socket file if .git directory is remote

If the .git directory is on a remote filesystem, create the socket
file in 'fsmonitor.socketDir' if it is defined, else create it in $HOME.

Signed-off-by: Eric DeCosta <edecosta@mathworks.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric DeCosta
2022-10-04 17:32:27 +00:00
committed by Junio C Hamano
parent 508c1a572d
commit 6beb2688d3
8 changed files with 78 additions and 13 deletions

View File

@ -3,6 +3,8 @@
#include "simple-ipc.h"
struct repository;
/*
* Returns true if built-in file system monitor daemon is defined
* for this platform.
@ -16,7 +18,7 @@ int fsmonitor_ipc__is_supported(void);
*
* Returns NULL if the daemon is not supported on this platform.
*/
const char *fsmonitor_ipc__get_path(void);
const char *fsmonitor_ipc__get_path(struct repository *r);
/*
* Try to determine whether there is a `git-fsmonitor--daemon` process