daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Nov 21st, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh                                                                                                                                                                          
  2.  
  3. for FILE in `git diff --cached --name-only`; do
  4.     if [[ $FILE == *.rs ]] && ! rustfmt --write-mode diff --skip-children $FILE; then
  5.         echo "Commit rejected due to invalid formatting of \"$FILE\" file."
  6.  
  7.         exit 1
  8.     fi
  9. done
RAW Paste Data
Top