Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable adding unstaged files when aider --commit is called from CLI #1812

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RomeoV
Copy link

@RomeoV RomeoV commented Sep 29, 2024

Currently, running aider --commit will add all unstaged files and then
create a commit. However, a useful workflow using aider may involve just
staging a few files and then calling aider --commit to commit those
files.

In fact, I believe this to be the sensible default. Therefore, this PR
passes the information whether the commit was triggered explicitly from
the command line interface (CLI), or rather internally later. If it was
triggered from CLI, then after this change aider will not append the
-a flag to the git commit command.

Closes #879.

Currently, running `aider --commit` will add all unstaged files and then
create a commit. However, a useful workflow using aider may involve just
staging a few files and then calling `aider --commit` to commit those
files.

In fact, I believe this to be the sensible default. Therefore, this PR
passes the information whether the commit was triggered explicitly from
the command line interface (CLI), or rather internally later. If it was
triggered from CLI, then after this change aider will not append the
`-a` flag to the `git commit` command.
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.

Enhancement: Only commit staged files if files have been staged.
1 participant