Be sure to include staged files in get_tracked_files

This commit is contained in:
Paul Gauthier 2023-07-24 13:05:00 -03:00
parent e52807b868
commit 96f15c4533

View file

@ -1014,6 +1014,11 @@ class Coder:
if blob.type == "blob": # blob is a file
files.append(blob.path)
# Add staged files
index = self.repo.index
staged_files = [item.a_path for item in index.diff("HEAD")]
files.extend(staged_files)
# convert to appropriate os.sep, since git always normalizes to /
res = set(str(Path(PurePosixPath(path))) for path in files)