mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
Finished removing reliance on aider:
This commit is contained in:
parent
5a3627de6e
commit
39f10aefe0
2 changed files with 7 additions and 3 deletions
|
@ -332,7 +332,7 @@ class Commands:
|
|||
|
||||
last_commit = self.coder.repo.repo.head.commit
|
||||
if (
|
||||
not last_commit.message.startswith("aider:")
|
||||
"(aider)" not in last_commit.committer.name
|
||||
or last_commit.hexsha[:7] != self.coder.last_aider_commit_hash
|
||||
):
|
||||
self.io.tool_error("The last commit was not made by aider in this chat session.")
|
||||
|
|
|
@ -523,16 +523,20 @@ class TestCommands(TestCase):
|
|||
other_path.write_text("other content")
|
||||
repo.git.add(str(other_path))
|
||||
|
||||
os.environ["GIT_COMMITTER_NAME"] = "Foo (aider)"
|
||||
|
||||
# Create and commit a file
|
||||
filename = "test_file.txt"
|
||||
file_path = Path(repo_dir) / filename
|
||||
file_path.write_text("first content")
|
||||
repo.git.add(filename)
|
||||
repo.git.commit("-m", "aider: first commit")
|
||||
repo.git.commit("-m", "first commit")
|
||||
|
||||
file_path.write_text("second content")
|
||||
repo.git.add(filename)
|
||||
repo.git.commit("-m", "aider: second commit")
|
||||
repo.git.commit("-m", "second commit")
|
||||
|
||||
del os.environ["GIT_COMMITTER_NAME"]
|
||||
|
||||
# Store the commit hash
|
||||
last_commit_hash = repo.head.commit.hexsha[:7]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue