Got basic replication working :)

This commit is contained in:
Mikayla Maki 2023-05-10 16:07:41 -07:00
parent 2b80dfa81d
commit e20eaca595
No known key found for this signature in database
7 changed files with 256 additions and 41 deletions

View file

@ -7,7 +7,7 @@ use git2::Repository as LibGitRepository;
use lazy_static::lazy_static;
use parking_lot::Mutex;
use regex::Regex;
use repository::{GitRepository, GitFileStatus};
use repository::{GitFileStatus, GitRepository};
use rope::Rope;
use smol::io::{AsyncReadExt, AsyncWriteExt};
use std::borrow::Cow;
@ -660,9 +660,7 @@ impl FakeFs {
state.worktree_statuses.extend(
statuses
.iter()
.map(|(path, content)| {
((**path).into(), content.clone())
}),
.map(|(path, content)| ((**path).into(), content.clone())),
);
});
}

View file

@ -194,7 +194,7 @@ pub enum GitFileStatus {
pub struct RepoPath(PathBuf);
impl RepoPath {
fn new(path: PathBuf) -> Self {
pub fn new(path: PathBuf) -> Self {
debug_assert!(path.is_relative(), "Repo paths must be relative");
RepoPath(path)