summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-04 07:26:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-04 07:26:46 (GMT)
commitc8ddd2aa116710e3442bc54cd750824a88a900d4 (patch)
tree96164fa3bf625e72f69879ca41420d3cd668e990
parent9f3e2fe9f4176b5f0eb14e26b34d21f4dffcebd2 (diff)
parent501d3cd7b8cf469e6a5aa86809fc25316695d344 (diff)
downloadgit-c8ddd2aa116710e3442bc54cd750824a88a900d4.zip
git-c8ddd2aa116710e3442bc54cd750824a88a900d4.tar.gz
git-c8ddd2aa116710e3442bc54cd750824a88a900d4.tar.bz2
Merge branch 'sr/hooks-cwd-doc'
* sr/hooks-cwd-doc: githooks.txt: clarify push hooks are always executed in $GIT_DIR
-rw-r--r--Documentation/githooks.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 32343ae..706091a 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