From 2e1f11289b34e04f71a64b531449c8e96404428e Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Tue, 18 Feb 2014 14:45:33 +0100 Subject: 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 Reviewed-by: Evan Huus Reviewed-by: Alexis La Goutte --- tools/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') 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 -- cgit v1.2.1