docs: Add comment about potential error in index.entries.keys usage

This commit is contained in:
Paul Gauthier 2025-03-05 17:39:53 -08:00 committed by Paul Gauthier (aider)
parent 1a6f290979
commit ad4bd91751

View file

@ -309,6 +309,7 @@ class GitRepo:
# Add staged files # Add staged files
index = self.repo.index index = self.repo.index
# index.entries.keys can throw ANY_GIT_ERROR ai!
staged_files = [path for path, _ in index.entries.keys()] staged_files = [path for path, _ in index.entries.keys()]
files.update(self.normalize_path(path) for path in staged_files) files.update(self.normalize_path(path) for path in staged_files)