We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d40914 commit 83c00a9Copy full SHA for 83c00a9
.lefthook/pre-commit/lint
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-if ! git diff --name-only | grep -qe ".*\.go$"; then
+if ! git diff --staged --name-only | grep -qe ".*\.go$"; then
4
echo "Nothing to lint"
5
exit 0;
6
fi
.lefthook/pre-push/test
-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"
0 commit comments