summaryrefslogtreecommitdiff
path: root/Documentation/githooks.txt
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2017-04-29 12:28:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-01 01:56:15 (GMT)
commit501d3cd7b8cf469e6a5aa86809fc25316695d344 (patch)
tree776718809919e3ade49bfd26973ee5da2bca8658 /Documentation/githooks.txt
parent49800c940790cc7465d1b03e08d472ffd8684808 (diff)
downloadgit-501d3cd7b8cf469e6a5aa86809fc25316695d344.zip
git-501d3cd7b8cf469e6a5aa86809fc25316695d344.tar.gz
git-501d3cd7b8cf469e6a5aa86809fc25316695d344.tar.bz2
githooks.txt: clarify push hooks are always executed in $GIT_DIR
Listing the specific hooks might feel verbose but without it the reader is left to wonder which hooks are triggered during the push. Something which is not immediately obvious when only trying to find out where the hook is executed. Signed-off-by: Simon Ruderich <simon@ruderich.org> Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/githooks.txt')
-rw-r--r--Documentation/githooks.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 9565dc3..f7d230f 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -22,8 +22,10 @@ changed via the `core.hooksPath` configuration variable (see
linkgit:git-config[1]).
Before Git invokes a hook, it changes its working directory to either
-the root of the working tree in a non-bare repository, or to the
-$GIT_DIR in a bare repository.
+$GIT_DIR in a bare repository or the root of the working tree in a non-bare
+repository. An exception are hooks triggered during a push ('pre-receive',
+'update', 'post-receive', 'post-update', 'push-to-checkout') which are always
+executed in $GIT_DIR.
Hooks can get their arguments via the environment, command-line
arguments, and stdin. See the documentation for each hook below for