Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function git() {
- if [ "$1" = push ] && [[ "$3" = *"refs/heads"* ]] ; then
- echo "ARE YOU SURE YOU WANT TO PUSH TO REFS/HEADS?"
- echo -n "Think hard and type uppercase YES to skip Gerrit review: "
- read answer
- if [ YES = "$answer" ]; then
- command git "$@"
- else
- echo "Aborting command, push not executed."
- fi
- else
- command git "$@"
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement