mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
more robust get_tracked_files with pathlib
This commit is contained in:
parent
c6696e7245
commit
e996c56a51
2 changed files with 3 additions and 5 deletions
|
@ -955,10 +955,8 @@ class Coder:
|
|||
def get_tracked_files(self):
|
||||
# convert to appropriate os.sep, since git always normalizes to /
|
||||
files = set(self.repo.git.ls_files().splitlines())
|
||||
# return files
|
||||
if os.sep == "/":
|
||||
return files
|
||||
return set(path.replace("/", os.sep) for path in files)
|
||||
res = set(str(Path(PurePosixPath(path))) for path in files)
|
||||
return res
|
||||
|
||||
apply_update_errors = 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue