Skip to content

feat(cli): add --diff flag to show staged changes in editor#24

Merged
takai merged 1 commit into
mainfrom
feat/diff-flag
Mar 31, 2026
Merged

feat(cli): add --diff flag to show staged changes in editor#24
takai merged 1 commit into
mainfrom
feat/diff-flag

Conversation

@takai

@takai takai commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add -d / --diff CLI flag that passes --verbose to git commit when in edit mode, showing the staged diff in the editor so the user can verify the AI-generated message against actual code changes
  • --diff implies --edit — using it alone automatically opens the editor
  • Maps to git's native --verbose flag for seamless integration

Test plan

  • go build ./... passes
  • go test ./... passes (3 new test cases for --diff, -d, -de cluster)
  • Manual: git ai-commit --diff opens editor with diff visible below commit message
  • Manual: git ai-commit -de opens editor with diff (cluster shorthand)

@takai takai merged commit 407ece5 into main Mar 31, 2026
1 check passed
@takai takai deleted the feat/diff-flag branch March 31, 2026 21:39
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.

1 participant