Commit 18358af3 authored by Brad King's avatar Brad King
Browse files

Load local hooks configuration from work tree

Look for a ".hooks-config.bash" file at the top of the work tree.
Load it in each hook to get per-project configuration.  Currently
we do not define any config options, but this adds the framework.
parent e8180f20
......@@ -35,6 +35,8 @@ die() {
exit 1
}
. "$GIT_DIR/hooks/hooks-config.bash"
#-----------------------------------------------------------------------------
# Check the commit message layout with a simple state machine.
......
#=============================================================================
# Copyright 2010-2011 Kitware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
# Load hooks configuration from source tree.
config=".hooks-config.bash" && test -r "$config" && . "$config"
# vim: set filetype=sh tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab :
......@@ -23,6 +23,8 @@ die() {
exit 1
}
. "$GIT_DIR/hooks/hooks-config.bash"
zero='0000000000000000000000000000000000000000'
#-----------------------------------------------------------------------------
......
......@@ -15,6 +15,8 @@
# limitations under the License.
#=============================================================================
. "$GIT_DIR/hooks/hooks-config.bash"
#-----------------------------------------------------------------------------
# Chain to project-specific hook.
. "$GIT_DIR/hooks/hooks-chain.bash"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment