@@ -1,6 +1,6 @@
#!/bin/sh
-if ! git diff --name-only | grep -qe ".*\.go$"; then
+if ! git diff --staged --name-only | grep -qe ".*\.go$"; then
echo "Nothing to lint"
exit 0;
fi
-if ! git diff --name-only | grep -qe ".*\.(go|h|c)$"; then
+if ! git diff --staged --name-only | grep -qe ".*\.(go|h|c)$"; then
echo "Nothing to test"