summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-02-18 14:45:33 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-02-20 18:24:05 +0000
commit2e1f11289b34e04f71a64b531449c8e96404428e (patch)
treea0debcabc91dc4753a6a1436630f955b1779355a /tools
parent64b474610c50b6aade4f271b2b1ee603f3fc7a04 (diff)
downloadwireshark-2e1f11289b34e04f71a64b531449c8e96404428e.tar.gz
Enhance pre-commit tools to avoid false positive
Limit check to file with extension *.c or *.h Change-Id: I6e237e6fd053083d271924120973a6b07e2d4e53 Reviewed-on: https://code.wireshark.org/review/247 Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@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 4fc5352d34..2103d3482f 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -7,7 +7,7 @@
# From
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
#
-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