#!/bin/sh GITROOT=`git rev-parse --show-toplevel` EXIT_STATUS=0 # Lint all the files in the index, excluding deletions and directories. git diff-index -z --cached --name-only --diff-filter='ACMRTUXB' HEAD | xargs -0 ls -dp | grep -v '/$' | xargs "$GITROOT/lint" if [ "$?" != "0" ]; then echo "Files did not pass linting."; EXIT_STATUS=1 fi exit $EXIT_STATUS;