Document that hooks are run from the top-level directory and that
GIT_PREFIX is set to the name of the original subdirectory (relative
to the top-level directory).

Signed-off-by: Richard Hansen <rhan...@bbn.com>
---
 Documentation/githooks.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 9ef2469..c08f4fd 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -26,6 +26,12 @@ executable by default.
 
 This document describes the currently defined hooks.
 
+Hooks are executed from the top-level directory of a repository, which
+may not necessarily be the current directory.
+The 'GIT_PREFIX' environment variable is set as returned by running
+'git rev-parse --show-prefix' from the original current directory.
+See linkgit:git-rev-parse[1].
+
 HOOKS
 -----
 
-- 
2.2.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to