Skip to content

Commit c59344f

Browse files
Only test commited changes on pre-push hook
1 parent 3587a6a commit c59344f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.githooks/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
#!/bin/sh
2+
root_dir=$(git rev-parse --show-toplevel)
3+
tempdir=$(mktemp -d)
4+
cd $tempdir
5+
git clone $root_dir . --quiet
26
Rscript -e "devtools::test(stop_on_failure=TRUE)"

0 commit comments

Comments
 (0)