diff options
| author | 2026-05-19 16:45:17 +0100 | |
|---|---|---|
| committer | 2026-05-19 16:45:17 +0100 | |
| commit | 1f6dc84f68b4631e77ebc11a452cb0b03eecde57 (patch) | |
| tree | ff8c7b094a1b9b9c0aa7836faab21b8a6b8f9a17 /remote-dev | |
| parent | 3dc375cffbb4a8d09374e66002f5ee50be95ead2 (diff) | |
| download | dotfiles-1f6dc84f68b4631e77ebc11a452cb0b03eecde57.tar.gz dotfiles-1f6dc84f68b4631e77ebc11a452cb0b03eecde57.tar.bz2 dotfiles-1f6dc84f68b4631e77ebc11a452cb0b03eecde57.zip | |
feat(git): commit-msg hook strips AI Co-authored-by trailers
Various agentic tools (Copilot CLI, VS Code chat, etc.) auto-append
`Co-authored-by: Copilot <...>` / Claude / Codex trailers, which then
trip the pre-push hook's agent-coauthor check and force a manual
amend before the push goes through. Scrub at commit time instead.
Uses the same agent-substring list as executable_pre-push (kept in
sync by comment). Triggered as commit-msg (not pre-commit — pre-commit
runs before the message exists). Drops matching trailers in-place,
collapses trailing blanks, and is a no-op otherwise.
Also symlinks the new hook in the remote-dev home-manager config so
it deploys on the Ubuntu VM.
Bypass: `git commit --no-verify`.
Diffstat (limited to 'remote-dev')
| -rw-r--r-- | remote-dev/home.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/remote-dev/home.nix b/remote-dev/home.nix index 926aadb..5dc55d0 100644 --- a/remote-dev/home.nix +++ b/remote-dev/home.nix @@ -161,6 +161,7 @@ in # so map each hook to its stripped name explicitly. The executable bit # comes from the working-tree file mode (git resolves the symlink). "git/hooks/pre-push".source = link "dot_config/git/hooks/executable_pre-push"; + "git/hooks/commit-msg".source = link "dot_config/git/hooks/executable_commit-msg"; }; # ── Rootless podman config ────────────────────────────────────────────────── |
