]> gitweb.fluxo.info Git - git-hooks.git/commitdiff
Only echo the name of the script and hook if GIT_HOOKS_VERBOSE is set.
authorBenjamin C Meyer <ben@meyerhome.net>
Fri, 19 Mar 2010 06:46:04 +0000 (02:46 -0400)
committerBenjamin C Meyer <ben@meyerhome.net>
Fri, 19 Mar 2010 06:50:54 +0000 (02:50 -0400)
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
git-hooks

index 79e5ae8c423d7c975907f1dde9903e3063d8463a..da69ca52ac09e2b8a74fc3771810dbacadb8ac1f 100755 (executable)
--- a/git-hooks
+++ b/git-hooks
@@ -50,9 +50,11 @@ function run_hooks
     shift 1
     for hook in `list_hooks_in_dir "${dir}"`
     do
-        echo -n "@@ Running hook: "
-        echo -n `basename \`dirname "${hook}"\``
-        echo "/`basename "${hook}"`"
+        if [ ! -z ${GIT_HOOKS_VERBOSE} ] ; then
+            echo -n "@@ Running hook: "
+            echo -n `basename \`dirname "${hook}"\``
+            echo "/`basename "${hook}"`"
+        fi
         ${hook} "$@"
     done
 }