2017-02-15 17:38:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-08-16 13:50:12 +00:00
|
|
|
#protected_branch='master'
|
|
|
|
#current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
|
|
|
|
#
|
|
|
|
#if [[ $current_branch = *"$protected_branch"* ]]
|
|
|
|
#then
|
|
|
|
# read -p "You're about to push $current_branch, is that what you intended? [y|n] " -n 1 -r < /dev/tty
|
|
|
|
# echo
|
|
|
|
# if echo $REPLY | grep -E '^[Yy]$' > /dev/null
|
|
|
|
# then
|
|
|
|
# exit 0 # push will execute
|
|
|
|
# fi
|
|
|
|
# exit 1 # push will not execute
|
|
|
|
#else
|
|
|
|
# exit 0 # push will execute
|
|
|
|
#fi
|