git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
blob dba3ced6bb74cce1a8ee929cba66fc5a690a7a63 1886 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
#include "config.h"
#include "fsmonitor.h"
#include "fsmonitor-ipc.h"
#include "fsmonitor-settings.h"
#include "fsmonitor-path-utils.h"

 /*
 * For the builtin FSMonitor, we create the Unix domain socket for the
 * IPC in the .git directory.  If the working directory is remote,
 * then the socket will be created on the remote file system.  This
 * can fail if the remote file system does not support UDS file types
 * (e.g. smbfs to a Windows server) or if the remote kernel does not
 * allow a non-local process to bind() the socket.  (These problems
 * could be fixed by moving the UDS out of the .git directory and to a
 * well-known local directory on the client machine, but care should
 * be taken to ensure that $HOME is actually local and not a managed
 * file share.)
 *
 * FAT32 and NTFS working directories are problematic too.
 *
 * The builtin FSMonitor uses a Unix domain socket in the .git
 * directory for IPC.  These Windows drive formats do not support
 * Unix domain sockets, so mark them as incompatible for the daemon.
 *
 */
static enum fsmonitor_reason check_uds_volume(struct repository *r)
{
	struct fs_info fs;
	const char *ipc_path = fsmonitor_ipc__get_path();
	struct strbuf path = STRBUF_INIT;
	strbuf_add(&path, ipc_path, strlen(ipc_path));

	if (fsmonitor__get_fs_info(dirname(path.buf), &fs) == -1) {
		strbuf_release(&path);
		return FSMONITOR_REASON_ERROR;
	}

	strbuf_release(&path);

	if (fs.is_remote)
		return FSMONITOR_REASON_REMOTE;

	if (!strcmp(fs.typename, "msdos")) /* aka FAT32 */
		return FSMONITOR_REASON_NOSOCKETS;

	if (!strcmp(fs.typename, "ntfs"))
		return FSMONITOR_REASON_NOSOCKETS;

	return FSMONITOR_REASON_OK;
}

enum fsmonitor_reason fsm_os__incompatible(struct repository *r)
{
	enum fsmonitor_reason reason;

	reason = check_uds_volume(r);
	if (reason != FSMONITOR_REASON_OK)
		return reason;

	return FSMONITOR_REASON_OK;
}

debug log:

solving dba3ced6bb7 ...
found dba3ced6bb7 in https://80x24.org/mirrors/git.git

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).