#!/bin/sh
git stash -q --keep-index
black . --check
RESULT=$?
if [ $RESULT != 0 ]; then
    echo "Commit rejected. Reformat your code with \"black .\""
fi
git stash pop -q
exit $RESULT
