From: Ben Peart <peartben@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, benpeart@microsoft.com, pclouds@gmail.com,
johannes.schindelin@gmx.de, David.Turner@twosigma.com,
peff@peff.net
Subject: [PATCH v2 5/6] fsmonitor: add documentation for the fsmonitor extension.
Date: Thu, 18 May 2017 16:13:32 -0400 [thread overview]
Message-ID: <20170518201333.13088-6-benpeart@microsoft.com> (raw)
In-Reply-To: <20170518201333.13088-1-benpeart@microsoft.com>
This includes the core.fsmonitor setting, the query-fsmonitor hook,
and the fsmonitor index extension.
Signed-off-by: Ben Peart <benpeart@microsoft.com>
---
Documentation/config.txt | 7 +++++++
Documentation/githooks.txt | 23 +++++++++++++++++++++++
Documentation/technical/index-format.txt | 18 ++++++++++++++++++
3 files changed, 48 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 96e9cf8b73..4ffbf0d4c2 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -389,6 +389,13 @@ core.protectNTFS::
8.3 "short" names.
Defaults to `true` on Windows, and `false` elsewhere.
+core.fsmonitor::
+ If set to true, call the query-fsmonitor hook proc which will
+ identify all files that may have had changes since the last
+ request. This information is used to speed up operations like
+ 'git commit' and 'git status' by limiting what git must scan to
+ detect changes.
+
core.trustctime::
If false, the ctime differences between the index and the
working tree are ignored; useful when the inode change time
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 706091a569..f7b4b4a844 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -448,6 +448,29 @@ The commits are guaranteed to be listed in the order that they were
processed by rebase.
+[[query-fsmonitor]]
+query-fsmonitor
+~~~~~~~~~~~~
+
+This hook is invoked when the configuration option core.fsmonitor is
+set and git needs to identify changed or untracked files. It takes
+a single argument which is the time in elapsed seconds since midnight,
+January 1, 1970.
+
+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
+should be inclusive so that it does not miss any potential changes.
+The paths should be relative to the root of the working directory
+and be separated by a single NUL.
+
+Git will limit what files it checks for changes as well as which
+directories are checked for untracked files based on the path names
+given.
+
+The exit status determines whether git will use the data from the
+hook to limit its search. On error, it will fall back to verifying
+all files and folders.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index ade0b0c445..b002d23c05 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -295,3 +295,21 @@ The remaining data of each directory block is grouped by type:
in the previous ewah bitmap.
- One NUL.
+
+== File System Monitor cache
+
+ The file system monitor cache tracks files for which the query-fsmonitor
+ hook has told us about changes. The signature for this extension is
+ { 'F', 'S', 'M', 'N' }.
+
+ The extension starts with
+
+ - 32-bit version number: the current supported version is 1.
+
+ - 64-bit time: the extension data reflects all changes through the given
+ time which is stored as the seconds elapsed since midnight, January 1, 1970.
+
+ - 32-bit bitmap size: the size of the CE_FSMONITOR_DIRTY bitmap.
+
+ - An ewah bitmap, the n-th bit indicates whether the n-th index entry
+ is CE_FSMONITOR_DIRTY.
--
2.13.0.windows.1.6.g4597375fc3
next prev parent reply other threads:[~2017-05-18 20:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 20:13 [PATCH v2 0/6] Fast git status via a file system watcher Ben Peart
2017-05-18 20:13 ` [PATCH v2 1/6] bswap: add 64 bit endianness helper get_be64 Ben Peart
2017-05-18 20:13 ` [PATCH v2 2/6] dir: make lookup_untracked() available outside of dir.c Ben Peart
2017-05-18 20:13 ` [PATCH v2 3/6] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files Ben Peart
2017-05-19 15:33 ` Ben Peart
2017-05-20 10:41 ` Junio C Hamano
2017-05-24 12:30 ` Christian Couder
2017-05-18 20:13 ` [PATCH v2 4/6] fsmonitor: add test cases for fsmonitor extension Ben Peart
2017-05-20 16:55 ` Torsten Bögershausen
2017-05-18 20:13 ` Ben Peart [this message]
2017-05-20 11:28 ` [PATCH v2 5/6] fsmonitor: add documentation for the " Junio C Hamano
2017-05-20 12:10 ` Ævar Arnfjörð Bjarmason
2017-05-22 16:18 ` Ben Peart
2017-05-22 17:28 ` Ævar Arnfjörð Bjarmason
2017-05-25 13:49 ` Ben Peart
2017-05-18 20:13 ` [PATCH v2 6/6] fsmonitor: add a sample query-fsmonitor hook script for Watchman Ben Peart
2017-05-24 13:12 ` Christian Couder
2017-05-26 9:47 ` Ævar Arnfjörð Bjarmason
2017-05-26 16:02 ` Ben Peart
2017-05-25 21:05 ` Ævar Arnfjörð Bjarmason
2017-05-24 10:54 ` [PATCH v2 0/6] Fast git status via a file system watcher Christian Couder
2017-05-25 13:55 ` Ben Peart
2017-05-27 6:57 ` Christian Couder
2017-05-30 18:05 ` Ben Peart
2017-05-30 20:33 ` Christian Couder
2017-05-30 23:11 ` Ben Peart
2017-05-31 7:37 ` Christian Couder
2017-05-31 7:59 ` Christian Couder
2017-05-31 13:37 ` Ben Peart
2017-05-31 14:10 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170518201333.13088-6-benpeart@microsoft.com \
--to=peartben@gmail.com \
--cc=David.Turner@twosigma.com \
--cc=benpeart@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).