mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 04:05:04 +00:00
Added new files to the git repo message
This commit is contained in:
parent
2e2eae0616
commit
238287312e
1 changed files with 6 additions and 4 deletions
|
@ -44,7 +44,7 @@ class Coder:
|
||||||
self.commands = Commands(self.io, self)
|
self.commands = Commands(self.io, self)
|
||||||
self.main_model = main_model
|
self.main_model = main_model
|
||||||
if main_model == "gpt-3.5-turbo":
|
if main_model == "gpt-3.5-turbo":
|
||||||
self.io.tool_error(f"This tool will almost certainly fail to work with {main_model}")
|
self.io.tool_error(f"Aider doesn't work well with {main_model}, use gpt-4 for best results.")
|
||||||
|
|
||||||
self.set_repo(fnames)
|
self.set_repo(fnames)
|
||||||
|
|
||||||
|
@ -84,7 +84,8 @@ class Coder:
|
||||||
|
|
||||||
if fname.is_dir():
|
if fname.is_dir():
|
||||||
continue
|
continue
|
||||||
self.io.tool(f"Loading {fname}")
|
|
||||||
|
self.io.tool(f"Added {fname} to the chat")
|
||||||
|
|
||||||
fname = fname.resolve()
|
fname = fname.resolve()
|
||||||
self.abs_fnames.add(str(fname))
|
self.abs_fnames.add(str(fname))
|
||||||
|
@ -121,9 +122,10 @@ class Coder:
|
||||||
repo.git.add(relative_fname)
|
repo.git.add(relative_fname)
|
||||||
self.io.tool(f"Added {relative_fname} to the git repo")
|
self.io.tool(f"Added {relative_fname} to the git repo")
|
||||||
show_files = ", ".join(new_files)
|
show_files = ", ".join(new_files)
|
||||||
commit_message = f"Initial commit: Added new files to the git repo: {show_files}"
|
commit_message = f"Added new files to the git repo: {show_files}"
|
||||||
repo.git.commit("-m", commit_message, "--no-verify")
|
repo.git.commit("-m", commit_message, "--no-verify")
|
||||||
self.io.tool(f"Committed new files with message: {commit_message}")
|
commit_hash = repo.head.commit.hexsha[:7]
|
||||||
|
self.io.tool(f"{commit_hash} {commit_message}")
|
||||||
else:
|
else:
|
||||||
self.io.tool_error("Skipped adding new files to the git repo.")
|
self.io.tool_error("Skipped adding new files to the git repo.")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue