Skip to content

Commit 83c00a9

Browse files
committedSep 16, 2019
Fix git hooks
1 parent 5d40914 commit 83c00a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎.lefthook/pre-commit/lint

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
if ! git diff --name-only | grep -qe ".*\.go$"; then
3+
if ! git diff --staged --name-only | grep -qe ".*\.go$"; then
44
echo "Nothing to lint"
55
exit 0;
66
fi

‎.lefthook/pre-push/test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
if ! git diff --name-only | grep -qe ".*\.(go|h|c)$"; then
3+
if ! git diff --staged --name-only | grep -qe ".*\.(go|h|c)$"; then
44
echo "Nothing to test"
55
exit 0;
66
fi

0 commit comments

Comments
 (0)
Please sign in to comment.