summaryrefslogtreecommitdiff
path: root/tools/pre-commit
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-08-03 22:59:57 -0400
committerEvan Huus <eapache@gmail.com>2014-08-04 11:50:08 +0000
commitf25f1ea562a82bff0118435faecbf8f6016c4fb9 (patch)
treee012669691d56e2c5ab879c4299a19e7057406c0 /tools/pre-commit
parentda5dd1830298248e6ae7a3c3d1b1184170d4d9b5 (diff)
downloadwireshark-f25f1ea562a82bff0118435faecbf8f6016c4fb9.tar.gz
Don't try and run checkAPIs.pl on deleted files
It fails, for obvious reasons, and makes it impossible to commit the removal of c/h files. Change-Id: Ifcd067f8959684e2e0191983fd60fb94ae86bca3 Reviewed-on: https://code.wireshark.org/review/3401 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-xtools/pre-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
index b336d34880..d48357baef 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -19,7 +19,7 @@ fi
exit_status=0
-for FILE in `git diff-index --cached --name-only HEAD | grep "\.[ch]$"` ; do
+for FILE in `git diff-index --cached --name-status HEAD | grep -v "^D" | cut -f2 | grep "\.[ch]$"` ; do
#Check if checkhf is good
./tools/checkhf.pl $FILE || exit_status=1