mirror of
https://github.com/Growstuff/growstuff.git
synced 2025-12-30 04:57:50 -05:00
14 lines
365 B
Bash
Executable File
14 lines
365 B
Bash
Executable File
# Git pre-commit hook
|
|
# To install, run "rake hooks"
|
|
|
|
if git diff-index --quiet HEAD --; then
|
|
# no changes between index and working copy; just run tests
|
|
rspec spec
|
|
else
|
|
# Test the version that's about to be committed,
|
|
# stashing all unindexed changes
|
|
git stash -q --keep-index
|
|
rspec spec
|
|
git stash pop -q
|
|
fi
|