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:
Paul Gauthier 2023-05-15 14:17:02 -07:00
parent 9ec43b4ee0
commit d59c821019

View file

@ -130,6 +130,7 @@ class Commands:
return return
commits = f"{self.coder.last_aider_commit_hash}~1" 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: if self.coder.pretty:
diff = self.coder.repo.git.diff(commits, "--color", self.coder.last_aider_commit_hash) diff = self.coder.repo.git.diff(commits, "--color", self.coder.last_aider_commit_hash)
else: else: