aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-01-04 12:34:22 -0800
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2018-01-04 21:32:27 +0000
commit8bf24f51cbb285c31a6b7101f63257d2010f7082 (patch)
treef940789f483204b5e4735311560165bf9eb7ee8c
parentd239da264c5d0ca2ecfd609ae3eccced939a4c46 (diff)
Pre-commit: Don't force whitespace checks everywhere.
Move the whitespace check (git diff-index --check --cached) inside the CHECK_FILES loop, otherwise editing SVGs with Inkscape will be much less convenient. Change-Id: I2b9e3575d54091572caa89e3e317e5e121984010 Reviewed-on: https://code.wireshark.org/review/25144 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rwxr-xr-xtools/pre-commit6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
index c71b173451..8ae0bc5a71 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -90,6 +90,9 @@ for FILE in $CHECK_FILES; do
#Check if checkfiltername is good
./tools/checkfiltername.pl $FILE || exit_status=1
+ # If there are whitespace errors, print the offending file names and fail. (from git pre-commit.sample)
+ git diff-index --check --cached ${COMMIT_ID} $FILE || exit_status=1
+
done
if [ "x$DIAMETER_FILES" != x ]
@@ -97,9 +100,6 @@ then
./tools/validate-diameter-xml.sh > /dev/null || exit_status=1
fi
-# If there are whitespace errors, print the offending file names and fail. (from git pre-commit.sample)
-git diff-index --check --cached ${COMMIT_ID} || exit_status=1
-
exit $exit_status
#