diff options
author | Roland Knall <roland.knall@br-automation.com> | 2014-03-13 14:28:43 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-03-13 14:46:36 +0000 |
commit | 73618c8d1c82ad64a6f6e885fbc72367082d1b26 (patch) | |
tree | 9e55d392e31d0f418191cc0168ed626ee306da54 /tools/pre-commit | |
parent | b5fae942daa4fb5d0518ca5de61b7bc9b7ce7bbc (diff) |
Pre-Commit Hook check to check for newer version
Insert a short check to always check for newer versions
in the tool directory of the pre-commit script
So far, only a warning is being generated, allowing the
developer to decide for him/herself
Change-Id: I6fce60e3de1d051757d0ed38eae8fdc94cec7662
Reviewed-on: https://code.wireshark.org/review/633
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-x | tools/pre-commit | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/pre-commit b/tools/pre-commit index 46fe838655..234b6c5a9d 100755 --- a/tools/pre-commit +++ b/tools/pre-commit @@ -11,6 +11,11 @@ # If there are whitespace errors, print the offending file names and fail. (from git pre-commit.sample) exec git diff-index --check --cached HEAD +# Check for newer versions of the pre-commit script +if [ ./.git/hooks/pre-commit -ot ./tools/pre-commit ] ; then + echo "Pre-commit hook script is outdated, please update!" +fi + for FILE in `git diff-index --cached --name-only HEAD` ; do #Exit immediately if a command exits with a non-zero status. set -e |