[PATCH 1/2] Documentation/githooks: mention pwd, $GIT_PREFIX
- From
- Richard Hansen <rhansen@bbn.com>
- Date
- Jan 10, 2015, 06:49 UTC
- Message-ID
- <1420872598-9609-2-git-send-email-rhansen@bbn.com>
- In-Reply-To
- <1420872598-9609-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 <rhansen@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