aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/githooks.txt
diff options
context:
space:
mode:
authorKevin Willford <Kevin.Willford@microsoft.com>2020-01-23 15:26:47 +0000
committerJunio C Hamano <gitster@pobox.com>2020-01-23 15:10:23 -0800
commitdfaed028620c2dca08d24583c7fc8b0aef9b6d0f (patch)
tree72d6ef707c44a6bc1b25e102e7986d380c057e6c /Documentation/githooks.txt
parente4e1e8342aa03c4e4585908736a103130cc8906d (diff)
downloadgit-dfaed028620c2dca08d24583c7fc8b0aef9b6d0f.tar.gz
fsmonitor: update documentation for hook version and watchman hooks
A new config value for core.fsmonitorHookVersion was added to be able to force the version of the fsmonitor hook. Possible values are 1 or 2. When this is not set the code will use a value of -1 and attempt to use version 2 of the hook first and if that fails will attempt version 1. Signed-off-by: Kevin Willford <Kevin.Willford@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/githooks.txt')
-rw-r--r--Documentation/githooks.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 50365f2914..3dccab5375 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -490,9 +490,16 @@ fsmonitor-watchman
~~~~~~~~~~~~~~~~~~
This hook is invoked when the configuration option `core.fsmonitor` is
-set to `.git/hooks/fsmonitor-watchman`. It takes two arguments, a version
-(currently 1) and the time in elapsed nanoseconds since midnight,
-January 1, 1970.
+set to `.git/hooks/fsmonitor-watchman` or `.git/hooks/fsmonitor-watchmanv2`
+depending on the version of the hook to use.
+
+Version 1 takes two arguments, a version (1) and the time in elapsed
+nanoseconds since midnight, January 1, 1970.
+
+Version 2 takes two arguments, a version (2) and a token that is used
+for identifying changes since the token. For watchman this would be
+a clock id. This version must output to stdout the new token followed
+by a NUL before the list of files.
The hook should output to stdout the list of all files in the working
directory that may have changed since the requested time. The logic