Added status trickle up

This commit is contained in:
Mikayla Maki 2023-05-11 12:01:42 -07:00
parent 5accf7cf4e
commit 5b2ee63f80
No known key found for this signature in database
8 changed files with 88 additions and 8 deletions

View file

@ -1013,9 +1013,13 @@ 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));
let status = (entry.path.parent().is_some() && !entry.is_ignored)
.then(|| {
snapshot
.repo_for(path)
.and_then(|entry| entry.status_for_path(&snapshot, path))
})
.flatten();
let mut details = EntryDetails {
filename: entry