diff options
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-x | tools/pre-commit | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/pre-commit b/tools/pre-commit index 75269264b0..3d2b009e49 100755 --- a/tools/pre-commit +++ b/tools/pre-commit @@ -53,6 +53,7 @@ fi exit_status=0 COMMIT_FILES=`git diff-index --cached --name-status ${COMMIT_ID} | grep -v "^D" | cut -f2 | grep "\.[ch]$"` +DIAMETER_FILES=`git diff-index --cached --name-status ${COMMIT_ID} | grep -v "^D" | cut -f2 | grep diameter/` # Path to filter script in the tools directory filter_script=${PWD}/tools/pre-commit-ignore.py @@ -91,6 +92,11 @@ for FILE in $CHECK_FILES; do done +if [ "x$DIAMETER_FILES" != x ] +then + ./tools/validate-diameter-xml.sh > /dev/null || exit_status=1 +fi + # If there are whitespace errors, print the offending file names and fail. (from git pre-commit.sample) git diff-index --check --cached ${COMMIT_ID} || exit_status=1 |