UNPKG

187 Bapplication/x-shView Raw
1#!/bin/sh
2STASH_NAME="pre-commit-$(date +%s)"
3git stash save -q --keep-index $STASH_NAME
4
5npm test
6
7STASHES=$(git stash list)
8if [[ $STASHES == "$STASH_NAME" ]]; then
9 git stash pop -q
10