github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/scripts/check-workspace-clean.sh (about) 1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 # The workspace is clean iff `git status --porcelain` produces no output. Any 6 # output is either an error message or a listing of an untracked/dirty file. 7 if [[ "$(git status --porcelain 2>&1)" != "" ]]; then 8 git status >&2 || true 9 git diff --no-ext-diff -a >&2 || true 10 echo "" >&2 11 echo "Error: make generate resulted in changes" >&2 12 exit 1 13 fi 14