Files
Claude (agent-1xfb3) 0539fb37ac docs(agents): a cherry-pick keeps its source's author, and the check is per own commit (improvise-1xfb.3)
The wrapper's contract drops cherry-pick, because git ignores
GIT_AUTHOR_NAME there, and rule 8's cherry-pick -x should keep who wrote
the commit. A new case asserts it. The pre-push check now asks that every
commit you made names your actor, since a stacked or cherry-picked commit
keeps its own author. Answers the Codex P2 and the review on PR #310.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
2026-09-24 20:39:18 -07:00

13 lines
457 B
Bash
Executable File

#!/usr/bin/env bash
# Run git with the commit AUTHOR named after the agent: `Claude ($BEADS_ACTOR)`.
# Why GIT_AUTHOR_NAME and not `-c user.name`: .agents/skills/wave/agent-rules.md.
set -euo pipefail
if [ -z "${BEADS_ACTOR:-}" ]; then
echo 'agent-git: BEADS_ACTOR is unset; refusing to author as the owner' >&2
echo 'usage: BEADS_ACTOR=<actor> scripts/agent-git commit|merge ...' >&2
exit 2
fi
GIT_AUTHOR_NAME="Claude ($BEADS_ACTOR)" exec git "$@"