Update pre-push hook, again
This commit is contained in:
parent
cda81045ee
commit
7dde0b6aae
1 changed files with 2 additions and 12 deletions
|
@ -1,18 +1,8 @@
|
|||
exitcode=
|
||||
if [ -z "$(git ls-files -m -o --exclude-from=.gitignore)" ];then
|
||||
echo No unstaged changes detected
|
||||
else
|
||||
echo The following files have unstaged changes:
|
||||
git ls-files -m -o --exclude-from=.gitignore
|
||||
fi
|
||||
if [ -z "$(git status --porcelain -M|grep '^[^?]')" ];then
|
||||
if [ -z "$(git status --porcelain -M)" ];then
|
||||
echo No uncommited changes detected
|
||||
else
|
||||
echo The following files have uncommited changes:
|
||||
git status --porcelain -M|grep '^[^?]'
|
||||
fi
|
||||
if [ -z "$exitcode" ];then
|
||||
unset exitcode
|
||||
git status --porcelain -M
|
||||
echo Refusing to push
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue