I author, agents generate code

This commit is contained in:
Willem van den Ende 2026-04-02 09:56:17 +00:00
parent 9e3f44bf74
commit dfa1763e5e
2 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
# Dokku setup (may contain secrets) # Dokku setup (may contain secrets)
dokku-setup.sh dokku-setup.sh
/output/ /output/
.claude/worktrees

29
scripts/strip-coauthor.sh Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Strip Co-Authored-By trailer lines from unpushed commits
#
# Usage: ./scripts/strip-coauthor.sh [base-ref]
# base-ref defaults to origin/main
set -euo pipefail
BASE="${1:-origin/main}"
count=$(git log --grep="Co-Authored-By" --oneline "$BASE..HEAD" | wc -l)
if [ "$count" -eq 0 ]; then
echo "No commits with Co-Authored-By found in $BASE..HEAD"
exit 0
fi
echo "Rewriting $count commit(s) to strip Co-Authored-By lines..."
git filter-branch -f --msg-filter '
sed "/^Co-Authored-By:.*$/d" | sed -e :a -e "/^\n*$/{$d;N;ba;}"
' "$BASE..HEAD"
remaining=$(git log --grep="Co-Authored-By" --oneline "$BASE..HEAD" | wc -l)
if [ "$remaining" -eq 0 ]; then
echo "Done. All Co-Authored-By lines removed."
else
echo "WARNING: $remaining commit(s) still contain Co-Authored-By lines."
exit 1
fi