mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
Properly handle all diff cases
This commit is contained in:
parent
7af82ba185
commit
285536105e
3 changed files with 24 additions and 33 deletions
|
@ -26,7 +26,7 @@ class TestRepo(unittest.TestCase):
|
|||
fname.write_text("workingdir\n")
|
||||
|
||||
git_repo = GitRepo(InputOutput(), None, ".")
|
||||
diffs = git_repo.get_diffs(False)
|
||||
diffs = git_repo.get_diffs()
|
||||
self.assertIn("index", diffs)
|
||||
self.assertIn("workingdir", diffs)
|
||||
|
||||
|
@ -49,7 +49,7 @@ class TestRepo(unittest.TestCase):
|
|||
fname2.write_text("workingdir\n")
|
||||
|
||||
git_repo = GitRepo(InputOutput(), None, ".")
|
||||
diffs = git_repo.get_diffs(False)
|
||||
diffs = git_repo.get_diffs()
|
||||
self.assertIn("index", diffs)
|
||||
self.assertIn("workingdir", diffs)
|
||||
|
||||
|
@ -67,7 +67,7 @@ class TestRepo(unittest.TestCase):
|
|||
repo.git.commit("-m", "second")
|
||||
|
||||
git_repo = GitRepo(InputOutput(), None, ".")
|
||||
diffs = git_repo.get_diffs(False, ["HEAD~1", "HEAD"])
|
||||
diffs = git_repo.diff_commits(False, "HEAD~1", "HEAD")
|
||||
dump(diffs)
|
||||
self.assertIn("two", diffs)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue