{"version":"2.1.0","anchor":"pre-emptive-git-commit-trailer-injection","canonical_anchor":"pre-emptive-git-commit-trailer-injection","heading":"Pre-emptive Git Commit Trailer Injection","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.0\/e\/pre-emptive-git-commit-trailer-injection","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.0","markdown":"### Pre-emptive Git Commit Trailer Injection\n\n**What**\n\nGit commit attribution trailers are now injected into the commit command before execution, rather than amending commits after the fact.\n\n**Details**\n\n- Uses `PreToolUse` hook to intercept git commit commands\n- Injects `Claude-Generated-By`, `Claude-Steers`, `Claude-Permission-Prompts`, `Claude-Escapes`, and `Claude-Plan` trailers directly into the commit message\n- Supports both HEREDOC-style commit messages and quoted `-m` style messages\n- Eliminates race conditions and edge cases from the previous post-commit amendment approach\n- Tracks injection state via `trailersInjectedForCurrentCommit` flag\n\n**Evidence**\n\n`x$7()` at line 530968 (contains `\"Attribution hook: PreToolUse - Injecting trailers into git commit command\"`)"}