Files
buzz/scripts/without-git-env.sh
Duncan 88f9341b2a feat(acp): enforce deterministic agent git commit identity
Managed agents commit through a Git wrapper that pins author/committer to
the agent's Nostr identity, signs with the agent key, and refuses identity
overrides, so commit attribution no longer depends on host Git config.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-30 10:24:04 -04:00

13 lines
615 B
Bash
Executable File

#!/usr/bin/env bash
# Git exports repository-local variables (GIT_DIR, GIT_INDEX_FILE, ...) to
# hooks. Pre-push lanes run test suites whose fixtures spawn git in temp dirs;
# with those variables inherited, fixtures operate on this checkout instead.
# Transport, credential, and TLS settings (GIT_SSH_COMMAND, GIT_ASKPASS, ...)
# are left intact.
set -euo pipefail
# Git also exports GIT_EXEC_PATH into hooks (--local-env-vars omits it); unset,
# a child git uses its own default, and an explicit override is dropped too.
# shellcheck disable=SC2046
unset $(git rev-parse --local-env-vars) GIT_EXEC_PATH
exec "$@"