Skip to content

[Feature]: Option to disable automatic GIT_COMMITTER_NAME/EMAIL override in forge commit #3107

@othelot

Description

@othelot

1. Why Do You NEED This Feature?

forge commit (implemented in crates/forge_app/src/git_app.rs:143-178) hardcodes:

// git_app.rs:150-153
let commit_command = format!(
"GIT_COMMITTER_NAME='ForgeCode' GIT_COMMITTER_EMAIL='noreply@forgecode.dev' git commit {flags} -m '{escaped_message}'"
);

This forces every commit I create through ForgeCode to have committer = ForgeCode noreply@forgecode.dev, even when my user.name / user.email are correctly set in git config. There is no CLI flag, env var, or config key to opt out. This is blocking my workflow in concrete ways:

• Signed commits (GPG / SSH / Sigstore): our signing policy requires author == committer. ForgeCode's override breaks that invariant and invalidates signatures.
• Corporate / client repos: commit-lint and policy checks reject commits whose committer is a non-human / non-allowlisted identity. Every forge commit fails CI
and has to be fixed with git commit --amend --reset-author afterward.
• Open-source contributions: upstream maintainers often require a clean human committer; I cannot submit ForgeCode-produced commits directly.
• git log --pretty=fuller, git shortlog, git blame, GitHub contributor graph: all get polluted by ForgeCode appearing as a committer.
• Privacy: the committer field publicly discloses which tool I used for each commit, which I may not want to reveal on external repos.

Impact of NOT having this: I have to either stop using forge commit on these repos, or manually rewrite committer info after every commit — which scales poorly and breaks signatures.

2. What Is NOT Possible Right Now?

• Cannot run forge commit and keep my own identity as the committer — the env-var override is unconditional in git_app.rs.
• No CLI flag (--no-committer-override, --preserve-committer, …).
• No env var (e.g., FORGE_NO_COMMITTER_OVERRIDE=1).
• No setting in /.config/forge / forge.yaml / repo-local config.

3. What WILL Be Possible With This Feature?

Add an opt-out so the committer env-var override in git_app.rs is skipped when disabled. Minimal proposal — any / all of:

• Config key in /.config/forge / forge.yaml:
◦ commit.override_committer = false (default: true — preserves current behavior)
• CLI flag on forge commit: --no-committer-override
• Env var: FORGE_NO_COMMITTER_OVERRIDE=1

Concrete outcomes:

• git log -1 --pretty=fuller shows my real identity as both Author: and Commit:.
• Signed commits remain valid (author == committer).
• Passes corporate commit-lint / OSS committer policies out of the box — no post-processing required.
• Clean git shortlog, git blame, contributor stats.
• Per-project override via repo-local config possible.
• No breaking change: default stays ON (current behavior). Users who rely on ForgeCode as committer keep it; users who need it off can opt out.

Proposed Solution (User Experience)

Keep current GIT_COMMITTER_* override ON by default to avoid breaking existing users. Add explicit opt-out via config / flag / env var.

Feature Category

Configuration

Priority/Impact

Medium - Would be nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureBrand new functionality, features, pages, workflows, endpoints, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions