forked from kemitix/git-next
44 lines
947 B
Rust
44 lines
947 B
Rust
//
|
|
#![cfg(not(tarpaulin_include))]
|
|
|
|
use git::OpenRepository;
|
|
use git_next_config as config;
|
|
use git_next_git as git;
|
|
|
|
struct MockForge;
|
|
#[derive(Clone, Debug)]
|
|
pub struct MockForgeEnv;
|
|
impl MockForgeEnv {
|
|
pub(crate) const fn new() -> Self {
|
|
Self
|
|
}
|
|
}
|
|
#[async_trait::async_trait]
|
|
impl git::ForgeLike for MockForgeEnv {
|
|
fn name(&self) -> String {
|
|
"mock".to_string()
|
|
}
|
|
|
|
async fn branches_get_all(&self) -> Result<Vec<config::BranchName>, git::branch::Error> {
|
|
todo!()
|
|
}
|
|
|
|
async fn file_contents_get(
|
|
&self,
|
|
_branch: &config::BranchName,
|
|
_file_path: &str,
|
|
) -> Result<String, git::file::Error> {
|
|
todo!()
|
|
}
|
|
|
|
async fn commit_status(&self, _commit: &git::Commit) -> git::commit::Status {
|
|
todo!()
|
|
}
|
|
|
|
fn repo_clone(
|
|
&self,
|
|
_gitdir: config::GitDir,
|
|
) -> Result<OpenRepository, git::repository::Error> {
|
|
todo!()
|
|
}
|
|
}
|