mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
finishing support for which=repo_files
This commit is contained in:
parent
6e68562cd0
commit
14b45f40f6
3 changed files with 8 additions and 24 deletions
|
@ -73,23 +73,11 @@ class Commands:
|
|||
return
|
||||
|
||||
if not self.coder.repo.is_dirty():
|
||||
self.console.print("[red]No changes to commit.")
|
||||
self.console.print("[red]No more changes to commit.")
|
||||
return
|
||||
|
||||
commit_message = args.strip()
|
||||
if commit_message:
|
||||
self.coder.repo.git.add(
|
||||
*[
|
||||
os.path.relpath(fname, self.coder.repo.working_tree_dir)
|
||||
for fname in self.coder.abs_fnames
|
||||
]
|
||||
)
|
||||
self.coder.repo.git.commit("-m", commit_message, "--no-verify")
|
||||
commit_hash = self.coder.repo.head.commit.hexsha[:7]
|
||||
self.console.print(f"[bright_black]{commit_hash} {commit_message}")
|
||||
return
|
||||
|
||||
self.coder.commit()
|
||||
self.coder.commit(message = commit_message, which="repo_files")
|
||||
|
||||
def cmd_undo(self, args):
|
||||
"Undo the last git commit if it was done by aider"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue