Convert git status calculation to use Entry IDs as the key instead of repo relative paths

This commit is contained in:
Mikayla Maki 2023-05-09 21:06:23 -07:00 committed by Mikayla Maki
parent 94a0de4c9f
commit f935047ff2
No known key found for this signature in database
7 changed files with 90 additions and 59 deletions

View file

@ -1013,10 +1013,9 @@ impl ProjectPanel {
let entry_range = range.start.saturating_sub(ix)..end_ix - ix;
for entry in &visible_worktree_entries[entry_range] {
let path = &entry.path;
let status = snapshot
.repo_for(path)
.and_then(|entry| entry.status_for(&snapshot, path));
.repo_for(&entry.path)
.and_then(|repo_entry| repo_entry.status_for(entry.id));
let mut details = EntryDetails {
filename: entry