Optimize full file status via passing in known file mtime

This commit is contained in:
Max Brunsfeld 2023-07-22 11:53:26 -07:00
parent 51d311affd
commit 6c09782aa2
2 changed files with 50 additions and 18 deletions

View file

@ -3658,8 +3658,7 @@ impl BackgroundScanner {
if let Ok(repo_path) = path.strip_prefix(work_dir.0) {
let repo_path = RepoPath(repo_path.into());
let repo = repo.repo_ptr.lock();
fs_entry.git_status =
repo.status(&repo_path).log_err().flatten();
fs_entry.git_status = repo.status(&repo_path, fs_entry.mtime);
}
}
}