]> gitweb.fluxo.info Git - git-hooks.git/commitdiff
Rather than using an environment variable just use the configuration
authorBenjamin C Meyer <ben@meyerhome.net>
Fri, 19 Mar 2010 06:38:40 +0000 (02:38 -0400)
committerBenjamin C Meyer <ben@meyerhome.net>
Fri, 19 Mar 2010 06:44:33 +0000 (02:44 -0400)
option hooks.global.

Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
README
git-hooks

diff --git a/README b/README
index 2adefcfc8899c5d49f12012ae58df6c6d1fe4a59..ab6ea76c0436e823d41286a0618d18369ed35759 100644 (file)
--- a/README
+++ b/README
@@ -19,9 +19,8 @@ or very specific to one person such as:
 git-hooks provide a way to manage and share your hooks by allowing for the installation of hooks in three locations:
  - User hooks that are installed in ~/.git_hooks/
  - Project hooks that are installed in the git_hooks directory inside of each project.
- - Global hooks that are specified with the environment variable GLOBAL_GIT_HOOKS.
-When GLOBAL_GIT_HOOKS is not set it defaults to the git-hooks /contrib/ folder.
+ - Global hooks that are specified with the hooks.global configuration option.
+
 Multiple global hooks directories can be specified by using a space between each path.
 
 For more details on Git Hooks checkout the online documentation at http://www.kernel.org/pub/software/scm/git/docs/githooks.html
index 14483482d7bdb28f028d6648d8e294f290cdaaae..d7ddc7cd4660efee955cd48788219bbf74be51a8 100755 (executable)
--- a/git-hooks
+++ b/git-hooks
@@ -36,11 +36,7 @@ function hook_dirs
     hook="${1}"
     echo "${HOME}/.git_hooks/${hook}"
     echo "${PWD}/git_hooks/${hook}"
-    if [ -z ${GLOBAL_GIT_HOOKS} ] ; then
-        echo "${GHD}/contrib/${hook}"
-    else
-        echo "${GLOBAL_GIT_HOOKS}"
-    fi
+    echo "`git config hooks.global`"/${hook}
 }
 
 function list_hooks_in_dir