Track index instead of head for diffs

This commit is contained in:
Julia 2022-09-29 13:10:39 -04:00
parent 9fe6a5e83e
commit e865b85d9c
3 changed files with 35 additions and 12 deletions

View file

@ -2603,7 +2603,13 @@ impl BackgroundScanner {
.git_repositories
.iter()
.map(|repo| repo.boxed_clone())
.filter(|repo| git::libgit::Repository::open(repo.git_dir_path()).is_ok())
.filter_map(|mut repo| {
if repo.reopen_git_repo() {
Some(repo)
} else {
None
}
})
.collect();
snapshot.git_repositories = new_repos;