From: Richard Hansen Date: Sat, 10 Jan 2015 23:11:42 GMT Subject: [PATCH v2 1/2] Documentation/githooks: mention pwd, $GIT_PREFIX Message-ID: <1420931503-22857-2-git-send-email-rhansen@bbn.com> In-Reply-To: <1420931503-22857-1-git-send-email-rhansen@bbn.com> 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 --- 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