diff --git a/contrib/source-control-tools/automated-commits.sh b/contrib/source-control-tools/automated-commits.sh --- a/contrib/source-control-tools/automated-commits.sh +++ b/contrib/source-control-tools/automated-commits.sh @@ -79,6 +79,10 @@ DEVTOOLS_DIR="${TOPLEVEL}"/contrib/devtools # Make sure tree is clean +if [ -n "$(git status --porcelain)" ]; then + echo "Error: The source tree has unexpected changes. Clean up any changes (try 'git stash') and try again." + exit 10 +fi git checkout master git reset --hard "${PARENT_COMMIT}"