Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function git() {
  2. if [ "$1" = push ] && [[ "$3" = *"refs/heads"* ]] ; then
  3. echo "ARE YOU SURE YOU WANT TO PUSH TO REFS/HEADS?"
  4. echo -n "Think hard and type uppercase YES to skip Gerrit review: "
  5. read answer
  6. if [ YES = "$answer" ]; then
  7. command git "$@"
  8. else
  9. echo "Aborting command, push not executed."
  10. fi
  11. else
  12. command git "$@"
  13. fi
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement