aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-17 18:04:47 +0100
committerEvan Huus <eapache@gmail.com>2014-03-17 17:22:23 +0000
commit1db0fc5c982e7d4c2fc4ff2397744bbc7a06778e (patch)
tree92073ee53c3274fceaaeafc0e7af93ef598eb9d5 /tools
parentb7492919abd59b5e3350de73d47cbdeb2ed2064a (diff)
Enhance pre-commit tools to avoid false positive
Limit check to file with extension *.c or *.h Patch revert by mistake in 49394d3101ec286b335213a9845b6d4202955021 Change-Id: Ifed4c833c740218e5e24b3176dc20802fa5849bb Reviewed-on: https://code.wireshark.org/review/719 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pre-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
index 234b6c5a9d..7cceb69a99 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -16,7 +16,7 @@ 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
+for FILE in `git diff-index --cached --name-only HEAD | grep "\.[ch]$"` ; do
#Exit immediately if a command exits with a non-zero status.
set -e