git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Hansen <rhansen@bbn.com>
To: 6t@kdbg.org
Cc: git@vger.kernel.org, rhansen@bbn.com
Subject: [PATCH v2 1/2] Documentation/githooks: mention pwd, $GIT_PREFIX
Date: Sat, 10 Jan 2015 18:11:42 -0500	[thread overview]
Message-ID: <1420931503-22857-2-git-send-email-rhansen@bbn.com> (raw)
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 <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

  reply	other threads:[~2015-01-10 23:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10  6:49 [PATCH 0/2] Documentation/githooks: mention pwd, $GIT_PREFIX Richard Hansen
2015-01-10  6:49 ` [PATCH 1/2] " Richard Hansen
2015-01-10  6:49 ` [PATCH 2/2] t1020-subdirectory.sh: check hook " Richard Hansen
2015-01-10  8:25   ` Johannes Sixt
2015-01-10 23:11     ` [PATCH v2 0/2] Documentation/githooks: mention " Richard Hansen
2015-01-10 23:11       ` Richard Hansen [this message]
2015-01-12 19:56         ` [PATCH v2 1/2] " Junio C Hamano
2015-01-10 23:11       ` [PATCH v2 2/2] t1020-subdirectory.sh: check hook " Richard Hansen
2015-01-12 22:38         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420931503-22857-2-git-send-email-rhansen@bbn.com \
    --to=rhansen@bbn.com \
    --cc=6t@kdbg.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).