mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
do not add new files to git
This commit is contained in:
parent
14d19e22b2
commit
d89316147a
2 changed files with 0 additions and 13 deletions
|
@ -190,9 +190,6 @@ class Coder:
|
|||
for fname in self.get_inchat_relative_files():
|
||||
self.io.tool_output(f"Added {fname} to the chat.")
|
||||
|
||||
if self.repo:
|
||||
self.repo.add_new_files(fname for fname in fnames if not Path(fname).is_dir())
|
||||
|
||||
self.summarizer = ChatSummary()
|
||||
self.summarizer_thread = None
|
||||
self.summarized_done_messages = None
|
||||
|
|
|
@ -49,16 +49,6 @@ class GitRepo:
|
|||
self.repo = git.Repo(repo_paths.pop(), odbt=git.GitDB)
|
||||
self.root = utils.safe_abs_path(self.repo.working_tree_dir)
|
||||
|
||||
def add_new_files(self, fnames):
|
||||
cur_files = [str(Path(fn).resolve()) for fn in self.get_tracked_files()]
|
||||
for fname in fnames:
|
||||
if str(Path(fname).resolve()) in cur_files:
|
||||
continue
|
||||
if not Path(fname).exists():
|
||||
continue
|
||||
self.io.tool_output(f"Adding {fname} to git")
|
||||
self.repo.git.add(fname)
|
||||
|
||||
def commit(self, context=None, prefix=None, message=None):
|
||||
if not self.repo.is_dirty():
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue