#!/bin/sh
# author: Elan Trybuch
# email: eitrybuch@gmail.com
# git: elaniobro
# twitter: elaniobro
# instagram: elaniobro
# license: MIT

# Check to see if we are on master branch. Stop accidental commits to it.
if [ $(git symbolic-ref HEAD 2>/dev/null) == "refs/heads/master" ]
then

echo "\033[48;5;124m                               .-------,                                  \033[0m"
echo "\033[48;5;124m                             .'         '.                                \033[0m"
echo "\033[48;5;124m                           .'  _ ___ _ __ '.                              \033[0m"
echo "\033[48;5;124m                           |  (_' | / \|_) |                              \033[0m"
echo "\033[48;5;124m                           |  ,_) | \_/|   |                              \033[0m"
echo "\033[48;5;124m                           '.             .'                              \033[0m"
echo "\033[48;5;124m                             '.         .'                                \033[0m"
echo "\033[48;5;124m                               '-------'                                  \033[0m"
echo "\033[48;5;124m             You should not commit to a master branch!                    \033[0m"
echo "\033[48;5;124m         If you meant to do so, re-try and use --no-verify                \033[0m"

  exit 1
fi
exit 0
