Skip to content

Commit e662fb1

Browse files
committed
Revert "Merge branch 'jh/builtin-fsmonitor-part2' into next"
This reverts commit 5f9d385, reversing changes made to 60aae87, so that we can replace the topic with fixup commits squashed in.
1 parent 00dc842 commit e662fb1

37 files changed

+110
-4301
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
/git-format-patch
7373
/git-fsck
7474
/git-fsck-objects
75-
/git-fsmonitor--daemon
7675
/git-gc
7776
/git-get-tar-commit-id
7877
/git-grep

Documentation/config/core.txt

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -62,54 +62,22 @@ core.protectNTFS::
6262
Defaults to `true` on Windows, and `false` elsewhere.
6363

6464
core.fsmonitor::
65-
If set to true, enable the built-in file system monitor
66-
daemon for this working directory (linkgit:git-fsmonitor--daemon[1]).
67-
+
68-
Like hook-based file system monitors, the built-in file system monitor
69-
can speed up Git commands that need to refresh the Git index
70-
(e.g. `git status`) in a working directory with many files. The
71-
built-in monitor eliminates the need to install and maintain an
72-
external third-party tool.
73-
+
74-
The built-in file system monitor is currently available only on a
75-
limited set of supported platforms. Currently, this includes Windows
76-
and MacOS.
77-
+
78-
Otherwise, this variable contains the pathname of the "fsmonitor"
79-
hook command.
80-
+
81-
This hook command is used to identify all files that may have changed
82-
since the requested date/time. This information is used to speed up
83-
git by avoiding unnecessary scanning of files that have not changed.
84-
+
85-
See the "fsmonitor-watchman" section of linkgit:githooks[5].
86-
+
87-
Note that if you concurrently use multiple versions of Git, such
88-
as one version on the command line and another version in an IDE
89-
tool, that the definition of `core.fsmonitor` was extended to
90-
allow boolean values in addition to hook pathnames. Git versions
91-
2.35.1 and prior will not understand the boolean values and will
92-
consider the "true" or "false" values as hook pathnames to be
93-
invoked. Git versions 2.26 thru 2.35.1 default to hook protocol
94-
V2 and will fall back to no fsmonitor (full scan). Git versions
95-
prior to 2.26 default to hook protocol V1 and will silently
96-
assume there were no changes to report (no scan), so status
97-
commands may report incomplete results. For this reason, it is
98-
best to upgrade all of your Git versions before using the built-in
99-
file system monitor.
65+
If set, the value of this variable is used as a command which
66+
will identify all files that may have changed since the
67+
requested date/time. This information is used to speed up git by
68+
avoiding unnecessary processing of files that have not changed.
69+
See the "fsmonitor-watchman" section of linkgit:githooks[5].
10070

10171
core.fsmonitorHookVersion::
102-
Sets the protocol version to be used when invoking the
103-
"fsmonitor" hook.
104-
+
105-
There are currently versions 1 and 2. When this is not set,
106-
version 2 will be tried first and if it fails then version 1
107-
will be tried. Version 1 uses a timestamp as input to determine
108-
which files have changes since that time but some monitors
109-
like Watchman have race conditions when used with a timestamp.
110-
Version 2 uses an opaque string so that the monitor can return
111-
something that can be used to determine what files have changed
112-
without race conditions.
72+
Sets the version of hook that is to be used when calling fsmonitor.
73+
There are currently versions 1 and 2. When this is not set,
74+
version 2 will be tried first and if it fails then version 1
75+
will be tried. Version 1 uses a timestamp as input to determine
76+
which files have changes since that time but some monitors
77+
like watchman have race conditions when used with a timestamp.
78+
Version 2 uses an opaque string so that the monitor can return
79+
something that can be used to determine what files have changed
80+
without race conditions.
11381

11482
core.trustctime::
11583
If false, the ctime differences between the index and the

Documentation/git-fsmonitor--daemon.txt

Lines changed: 0 additions & 75 deletions
This file was deleted.

Documentation/git-update-index.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,7 @@ FILE SYSTEM MONITOR
527527
This feature is intended to speed up git operations for repos that have
528528
large working directories.
529529

530-
It enables git to work together with a file system monitor (see
531-
linkgit:git-fsmonitor--daemon[1]
532-
and the
530+
It enables git to work together with a file system monitor (see the
533531
"fsmonitor-watchman" section of linkgit:githooks[5]) that can
534532
inform it as to what files have been modified. This enables git to avoid
535533
having to lstat() every file to find modified files.
@@ -540,8 +538,8 @@ looking for new files.
540538

541539
If you want to enable (or disable) this feature, it is easier to use
542540
the `core.fsmonitor` configuration variable (see
543-
linkgit:git-config[1]) than using the `--fsmonitor` option to `git
544-
update-index` in each repository, especially if you want to do so
541+
linkgit:git-config[1]) than using the `--fsmonitor` option to
542+
`git update-index` in each repository, especially if you want to do so
545543
across all repositories you use, because you can set the configuration
546544
variable in your `$HOME/.gitconfig` just once and have it affect all
547545
repositories you touch.

Makefile

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,6 @@ include shared.mak
473473
# directory, and the JSON compilation database 'compile_commands.json' will be
474474
# created at the root of the repository.
475475
#
476-
# If your platform supports a built-in fsmonitor backend, set
477-
# FSMONITOR_DAEMON_BACKEND to the "<name>" of the corresponding
478-
# `compat/fsmonitor/fsm-listen-<name>.c` that implements the
479-
# `fsm_listen__*()` routines.
480-
#
481476
# Define DEVELOPER to enable more compiler warnings. Compiler version
482477
# and family are auto detected, but could be overridden by defining
483478
# COMPILER_FEATURES (see config.mak.dev). You can still set
@@ -719,7 +714,6 @@ TEST_BUILTINS_OBJS += test-dump-split-index.o
719714
TEST_BUILTINS_OBJS += test-dump-untracked-cache.o
720715
TEST_BUILTINS_OBJS += test-example-decorate.o
721716
TEST_BUILTINS_OBJS += test-fast-rebase.o
722-
TEST_BUILTINS_OBJS += test-fsmonitor-client.o
723717
TEST_BUILTINS_OBJS += test-genrandom.o
724718
TEST_BUILTINS_OBJS += test-genzeros.o
725719
TEST_BUILTINS_OBJS += test-getcwd.o
@@ -937,8 +931,6 @@ LIB_OBJS += fetch-pack.o
937931
LIB_OBJS += fmt-merge-msg.o
938932
LIB_OBJS += fsck.o
939933
LIB_OBJS += fsmonitor.o
940-
LIB_OBJS += fsmonitor-ipc.o
941-
LIB_OBJS += fsmonitor-settings.o
942934
LIB_OBJS += gettext.o
943935
LIB_OBJS += gpg-interface.o
944936
LIB_OBJS += graph.o
@@ -1145,7 +1137,6 @@ BUILTIN_OBJS += builtin/fmt-merge-msg.o
11451137
BUILTIN_OBJS += builtin/for-each-ref.o
11461138
BUILTIN_OBJS += builtin/for-each-repo.o
11471139
BUILTIN_OBJS += builtin/fsck.o
1148-
BUILTIN_OBJS += builtin/fsmonitor--daemon.o
11491140
BUILTIN_OBJS += builtin/gc.o
11501141
BUILTIN_OBJS += builtin/get-tar-commit-id.o
11511142
BUILTIN_OBJS += builtin/grep.o
@@ -1995,11 +1986,6 @@ ifdef NEED_ACCESS_ROOT_HANDLER
19951986
COMPAT_OBJS += compat/access.o
19961987
endif
19971988

1998-
ifdef FSMONITOR_DAEMON_BACKEND
1999-
COMPAT_CFLAGS += -DHAVE_FSMONITOR_DAEMON_BACKEND
2000-
COMPAT_OBJS += compat/fsmonitor/fsm-listen-$(FSMONITOR_DAEMON_BACKEND).o
2001-
endif
2002-
20031989
ifeq ($(TCLTK_PATH),)
20041990
NO_TCLTK = NoThanks
20051991
endif
@@ -2856,9 +2842,6 @@ GIT-BUILD-OPTIONS: FORCE
28562842
@echo DC_SHA1=\''$(subst ','\'',$(subst ','\'',$(DC_SHA1)))'\' >>$@+
28572843
@echo SANITIZE_LEAK=\''$(subst ','\'',$(subst ','\'',$(SANITIZE_LEAK)))'\' >>$@+
28582844
@echo X=\'$(X)\' >>$@+
2859-
ifdef FSMONITOR_DAEMON_BACKEND
2860-
@echo FSMONITOR_DAEMON_BACKEND=\''$(subst ','\'',$(subst ','\'',$(FSMONITOR_DAEMON_BACKEND)))'\' >>$@+
2861-
endif
28622845
ifdef TEST_OUTPUT_DIRECTORY
28632846
@echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst ','\'',$(TEST_OUTPUT_DIRECTORY)))'\' >>$@+
28642847
endif

builtin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix);
159159
int cmd_for_each_repo(int argc, const char **argv, const char *prefix);
160160
int cmd_format_patch(int argc, const char **argv, const char *prefix);
161161
int cmd_fsck(int argc, const char **argv, const char *prefix);
162-
int cmd_fsmonitor__daemon(int argc, const char **argv, const char *prefix);
163162
int cmd_gc(int argc, const char **argv, const char *prefix);
164163
int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix);
165164
int cmd_grep(int argc, const char **argv, const char *prefix);

0 commit comments

Comments
 (0)