use index.entries

This commit is contained in:
Paul Gauthier 2023-07-24 13:47:33 -03:00
parent df096272bc
commit 66da82094d
2 changed files with 13 additions and 15 deletions

View file

@ -157,8 +157,8 @@ class GitRepo:
# Add staged files
index = self.repo.index
staged_files = [str(Path(PurePosixPath(path))) for path in index.entries.keys()]
dump(staged_files)
staged_files = [path for path, _ in index.entries.keys()]
files.extend(staged_files)
# convert to appropriate os.sep, since git always normalizes to /