Track index instead of head for diffs
This commit is contained in:
parent
9fe6a5e83e
commit
e865b85d9c
3 changed files with 35 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use fsevent::EventStream;
|
||||
use futures::{future::BoxFuture, Stream, StreamExt};
|
||||
use git::repository::{FakeGitRepository, GitRepository, RealGitRepository};
|
||||
use git::repository::{GitRepository, RealGitRepository};
|
||||
use language::LineEnding;
|
||||
use smol::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use std::{
|
||||
|
@ -854,7 +854,10 @@ impl Fs for FakeFs {
|
|||
}
|
||||
|
||||
fn open_repo(&self, abs_dot_git: &Path) -> Option<Box<dyn GitRepository>> {
|
||||
Some(FakeGitRepository::open(abs_dot_git.into(), 0))
|
||||
Some(git::repository::FakeGitRepository::open(
|
||||
abs_dot_git.into(),
|
||||
0,
|
||||
))
|
||||
}
|
||||
|
||||
fn is_fake(&self) -> bool {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue