Brand new run dialogue. This hasn't been updated all that much since the days of Strychnine. It's time for some modernizations. I think it's much improved, but if y'all hate it let me know and I'll either fix or revert it.

This commit is contained in:
Storm Dragon
2026-06-01 16:44:15 -04:00
parent 23a1ba93b8
commit e5bd73213d
7 changed files with 675 additions and 69 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -u
cacheFiles=()
while IFS= read -r stagedFile; do
case "$stagedFile" in
__pycache__/* | */__pycache__/* | *.pyc | *.pyo | *.pyd)
cacheFiles+=("$stagedFile")
;;
esac
done < <(git diff --cached --name-only --diff-filter=ACMR)
if [[ ${#cacheFiles[@]} -eq 0 ]]; then
exit 0
fi
printf 'Commit blocked: remove generated Python cache files from the index:\n' >&2
printf ' %s\n' "${cacheFiles[@]}" >&2
printf '\nUse git rm --cached -- <file> to unstage forced additions.\n' >&2
exit 1