mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Fixed bug with failing to clear git file status
This commit is contained in:
parent
62c445da57
commit
04041af78b
1 changed files with 6 additions and 2 deletions
|
@ -3086,7 +3086,7 @@ impl BackgroundScanner {
|
|||
}
|
||||
|
||||
let git_ptr = local_repo.repo_ptr.lock();
|
||||
git_ptr.worktree_status(&repo_path)?
|
||||
git_ptr.worktree_status(&repo_path)
|
||||
};
|
||||
|
||||
let work_dir = repo.work_directory(snapshot)?;
|
||||
|
@ -3097,7 +3097,11 @@ impl BackgroundScanner {
|
|||
.update(&work_dir_id, |entry| entry.scan_id = scan_id);
|
||||
|
||||
snapshot.repository_entries.update(&work_dir, |entry| {
|
||||
entry.worktree_statuses.insert(repo_path, status)
|
||||
if let Some(status) = status {
|
||||
entry.worktree_statuses.insert(repo_path, status);
|
||||
} else {
|
||||
entry.worktree_statuses.remove(&repo_path);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue