Skip to content

feat(git): support custom commit flags for app-run commits#977

Open
0xnim wants to merge 18 commits intopingdotgg:mainfrom
0xnim:main
Open

feat(git): support custom commit flags for app-run commits#977
0xnim wants to merge 18 commits intopingdotgg:mainfrom
0xnim:main

Conversation

@0xnim
Copy link

@0xnim 0xnim commented Mar 12, 2026

Related to #274.

What Changed

  • Added support for passing extra git commit flags
  • Added a Settings field for app run git commit flags, so users can configure flags like --no-gpg-sign

Why

T3 Code runs git commit non-interactively. On a machine with global commit.gpgsign=true, commits can fail because GPG prompts for a pass on /dev/tty, which does not exist in this case.

This PR does NOT add interactive GPG/password support. Instead its a small workaround fix, users can configure extra commit flags for app run commits, which makes setups like --no-gpg-sign possible without changing their global git config

UI Changes

Adds a new Settings field under Git for extra git commit flags

Before After
Screenshot 2026-03-12 at 3 27 23 AM Screenshot 2026-03-12 at 3 27 06 AM

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add user-configurable extra git commit flags to app-run commits

  • Adds a gitCommitFlags setting (max 4096 chars) to appSettings.ts and exposes a UI input in the settings route with warnings for non-flag tokens.
  • Introduces tokenizeCommitFlags in GitManager.ts to parse raw flag strings into CLI tokens, filtering out any tokens that don't start with a dash.
  • Threads the sanitized flags from GitActionsControlrunStackedAction mutation → GitManager.runCommitStepGitCore.commitgit commit invocation.
  • Risk: user-supplied flags are passed directly to git commit; only dash-prefixed tokens are filtered, but malformed flag values (e.g. --flag=value) are not further validated.

Macroscope summarized 9cc1019.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7313ad83-deaa-466a-826b-c77d6253c219

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 12, 2026
@0xnim
Copy link
Author

0xnim commented Mar 12, 2026

The worker errors seem to be pre existing

@juliusmarminge
Copy link
Member

juliusmarminge commented Mar 12, 2026

The worker errors seem to be pre existing

it's flaky right now but it keeps failing on this branch...

also can you resolve conflicts pls. i am unable to push since you PRd from main:
CleanShot 2026-03-12 at 12 08 41@2x

@juliusmarminge juliusmarminge added the accepted feature request accepted label Mar 12, 2026
@0xnim
Copy link
Author

0xnim commented Mar 12, 2026

Apologies, I never realized that was the reason you don't pr from main. I'll do it now.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Mar 12, 2026
@0xnim 0xnim marked this pull request as draft March 13, 2026 16:16
@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Mar 13, 2026
@0xnim 0xnim marked this pull request as ready for review March 13, 2026 16:38
@0xnim
Copy link
Author

0xnim commented Mar 17, 2026

this is ready to go

- Move extra commit args after message flags to avoid swallowing `-m`
- Drop non-flag tokens when tokenizing user-supplied commit flags
- Add tests and clarify the settings helper text
@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Mar 19, 2026
juliusmarminge and others added 6 commits March 19, 2026 12:07
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
juliusmarminge and others added 5 commits March 19, 2026 12:36
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows a yellow warning when non-flag tokens are entered (tokens not
starting with a dash), matching the server-side sanitization behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show a clear message about using = syntax instead of quotes,
before falling through to the non-flag token check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update tokenizer to handle --flag="value with spaces" and
--flag='value with spaces' syntax. Update client-side validation
to match. Remove "not supported yet" disclaimer from UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Keep the text generation and git commit flag controls compact
- Remove the extra git commit flag help text
- Simplify the reset button conditional formatting
@juliusmarminge
Copy link
Member

@macroscope-app review this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted feature request accepted size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants