From 1db0fc5c982e7d4c2fc4ff2397744bbc7a06778e Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 17 Mar 2014 18:04:47 +0100 Subject: 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 --- 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 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 -- cgit v1.2.3