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