summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/git-pre-commit-hook9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/git-pre-commit-hook b/bin/git-pre-commit-hook
index 4d81c5a7..e5a2d201 100755
--- a/bin/git-pre-commit-hook
+++ b/bin/git-pre-commit-hook
@@ -19,6 +19,13 @@ check_errors() {
cd $(dirname "$0")/../..
check_errors git stash --keep-index
-check_errors git diff --cached | bin/style-check 2>&1
+
+errors="$(git diff --cached | bin/style-check 2>&1)"
+status=$?
+if [ "$status" != "0" ]; then
+ echo "$errors"
+fi
+
check_errors git stash pop
+exit $status