Skip to content

feat: add a setting to disable git commit attribution - #344

Merged
parsakhaz merged 1 commit into
dcouple:mainfrom
frarredondo:feat/disable-git-attribution-setting
Jul 21, 2026
Merged

feat: add a setting to disable git commit attribution#344
parsakhaz merged 1 commit into
dcouple:mainfrom
frarredondo:feat/disable-git-attribution-setting

Conversation

@frarredondo

Copy link
Copy Markdown
Contributor

Summary

  • Adds a global gitAttributionEnabled setting (default true) that gates the GIT_COMMITTER_NAME/GIT_COMMITTER_EMAIL injection Pane adds to every commit made through its terminals, CLI panels, and internal git operations
  • The existing "Include Pane footer in commits" setting only controls the Co-Authored-By trailer — it never touched the committer identity, so commits always showed as "committed by runpane" on GitHub with no way to opt out
  • New getGitAttributionEnv() helper in attribution.ts centralizes the default-true gating logic, wired into all 9 injection sites (terminal panels, terminal sessions, run commands, CLI panels, project init, worktree operations ×3, editor commits ×2)
  • New "Attribute commits to Pane" toggle added to Settings → Worktrees & Git, right below the existing footer toggle

Fixes #343

Test plan

  • pnpm typecheck clean across all workspaces
  • pnpm lint — 0 errors (pre-existing warnings only, none in touched files)
  • pnpm --filter main test — new attribution.test.ts unit tests pass; updated terminalPanelManager.test.ts mock; full suite green aside from 3 pre-existing native-module ABI failures unrelated to this change
  • Manual verification in an isolated dev instance (separate PANE_DIR, throwaway git repo): toggled setting off → new terminal panel commit shows the user's own git identity as committer; toggled back on → new terminal panel commit shows Pane <runpane@users.noreply.github.com> again
  • Confirmed the one documented limitation: toggling only affects newly-spawned terminals/panels — an already-running panel keeps its launch-time env until reopened

Adds a global gitAttributionEnabled setting (default true) that gates
the GIT_COMMITTER_NAME/EMAIL injection Pane adds to every commit made
through its terminals, CLI panels, and internal git operations.

Previously "Include Pane footer in commits" was the only related
toggle, but it only controlled the Co-Authored-By trailer, not the
committer identity — so commits always showed as "committed by
runpane" on GitHub with no way to opt out.

- New getGitAttributionEnv() helper in attribution.ts, gating the
  existing GIT_ATTRIBUTION_ENV constant behind the setting
- Wired into all 9 injection sites (terminal panels, terminal
  sessions, run commands, CLI panels, project init, worktree
  operations, editor commits)
- New "Attribute commits to Pane" toggle in Settings > Worktrees & Git

Fixes dcouple#343

@parsakhaz parsakhaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved based on a read-only implementation review against issue #343.

Evidence checked:

  • The new gitAttributionEnabled flag is default-on and gates the Pane GIT_COMMITTER_NAME / GIT_COMMITTER_EMAIL injection through getGitAttributionEnv().
  • All attribution injection paths from the issue are covered: terminal panels, legacy terminal sessions, run commands, Claude/Codex CLI panels, project initialization, worktree internal commits, and editor commit/retry paths.
  • Config typing and persistence are wired on both main/frontend sides, and the setting is reachable in Settings > Worktrees & Git.
  • Node 22 checks passed locally on the PR head:
    • pnpm typecheck: PASS
    • pnpm lint: PASS, 0 errors; existing warnings only
    • Focused tests: pnpm --filter main exec vitest run src/utils/attribution.test.ts src/services/terminalPanelManager.test.ts: PASS, 16 tests

Non-blocking nuance: terminal-panel WSL startup still lists GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL in WSLENV even when attribution is disabled. Since the gated env no longer sets those variables, this should be harmless in normal use, but it would be reasonable future hardening to omit those names from WSLENV when attribution is disabled.

Recommendation: approve and merge.

@parsakhaz
parsakhaz merged commit 690ff58 into dcouple:main Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add a setting to disable git commit attribution

2 participants