mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
Handle diff of file not yet part of repo
This commit is contained in:
parent
9933ad85b0
commit
ae8d04a95f
4 changed files with 58 additions and 4 deletions
|
@ -721,7 +721,6 @@ class Coder:
|
|||
|
||||
self.io.tool_output(f"Committing {path} before applying edits.")
|
||||
self.need_commit_before_edits.add(path)
|
||||
return
|
||||
|
||||
def allowed_to_edit(self, path):
|
||||
full_path = self.abs_root_path(path)
|
||||
|
@ -763,6 +762,7 @@ class Coder:
|
|||
|
||||
self.abs_fnames.add(full_path)
|
||||
self.check_for_dirty_commit(path)
|
||||
|
||||
return True
|
||||
|
||||
apply_update_errors = 0
|
||||
|
@ -891,6 +891,7 @@ class Coder:
|
|||
return
|
||||
if not self.repo:
|
||||
return
|
||||
|
||||
self.repo.commit(fnames=self.need_commit_before_edits)
|
||||
|
||||
# files changed, move cur messages back behind the files messages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue