mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
Refactored GitRepo class to use consistent quotation marks for git commands.
This commit is contained in:
parent
5d8ed278aa
commit
abbe5416a1
1 changed files with 4 additions and 2 deletions
|
@ -249,14 +249,16 @@ class GitRepo:
|
|||
dirty_files = set()
|
||||
|
||||
# Get staged files
|
||||
staged_files = self.repo.git.diff('--name-only', '--cached').splitlines()
|
||||
staged_files = self.repo.git.diff("--name-only", "--cached").splitlines()
|
||||
dirty_files.update(staged_files)
|
||||
|
||||
# Get unstaged files
|
||||
unstaged_files = self.repo.git.diff('--name-only').splitlines()
|
||||
unstaged_files = self.repo.git.diff("--name-only").splitlines()
|
||||
dirty_files.update(unstaged_files)
|
||||
|
||||
return list(dirty_files)
|
||||
|
||||
def is_dirty(self, path=None):
|
||||
if path and not self.path_in_repo(path):
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue