mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 21:24:59 +00:00
Be sure to include staged files in get_tracked_files
This commit is contained in:
parent
e52807b868
commit
96f15c4533
1 changed files with 5 additions and 0 deletions
|
@ -1014,6 +1014,11 @@ class Coder:
|
||||||
if blob.type == "blob": # blob is a file
|
if blob.type == "blob": # blob is a file
|
||||||
files.append(blob.path)
|
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 /
|
# convert to appropriate os.sep, since git always normalizes to /
|
||||||
res = set(str(Path(PurePosixPath(path))) for path in files)
|
res = set(str(Path(PurePosixPath(path))) for path in files)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue