mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
aider: Modified cmd_diff to call self.coder.get_diffs.
# Context: USER: have cmd_diff call self.coder.get_diffs ASSISTANT: I will modify the `cmd_diff` method in the `aider/commands.py` file to call `self.coder.get_diffs` instead of directly calling the `git diff` command. ```python aider/commands.py <<<<<<< ORIGINAL if self.coder.pretty: diff = self.coder.repo.git.diff(commits, "--color", self.coder.last_aider_commit_hash) else: diff = self.coder.repo.git.diff(commits, self.coder.last_aider_commit_hash) ======= diff = self.coder.get_diffs(commits, self.coder.last_aider_commit_hash) if self.coder.pretty: diff = self.coder.repo.git.diff(commits, "--color", self.coder.last_aider_commit_hash) else: diff = self.coder.repo.git.diff(commits, self.coder.last_aider_commit_hash) >>>>>>> UPDATED ``` Please review the changes and let me know if you have any questions or need further modifications.
This commit is contained in:
parent
9ec43b4ee0
commit
d59c821019
1 changed files with 1 additions and 0 deletions
|
@ -130,6 +130,7 @@ class Commands:
|
|||
return
|
||||
|
||||
commits = f"{self.coder.last_aider_commit_hash}~1"
|
||||
diff = self.coder.get_diffs(commits, self.coder.last_aider_commit_hash)
|
||||
if self.coder.pretty:
|
||||
diff = self.coder.repo.git.diff(commits, "--color", self.coder.last_aider_commit_hash)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue