2024-05-23 08:53:16 +01:00
|
|
|
//
|
|
|
|
#![cfg(not(tarpaulin_include))]
|
|
|
|
|
2024-05-18 11:41:18 +01:00
|
|
|
use git::OpenRepository;
|
2024-05-23 16:50:36 +01:00
|
|
|
use git_next_config as config;
|
2024-05-23 16:19:28 +01:00
|
|
|
use git_next_git as git;
|
2024-05-11 19:46:20 +01:00
|
|
|
|
2024-04-16 22:21:55 +01:00
|
|
|
struct MockForge;
|
2024-05-04 12:37:35 +01:00
|
|
|
#[derive(Clone, Debug)]
|
2024-04-16 22:21:55 +01:00
|
|
|
pub struct MockForgeEnv;
|
|
|
|
impl MockForgeEnv {
|
|
|
|
pub(crate) const fn new() -> Self {
|
|
|
|
Self
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#[async_trait::async_trait]
|
2024-05-23 16:50:36 +01:00
|
|
|
impl git::ForgeLike for MockForgeEnv {
|
2024-04-16 22:21:55 +01:00
|
|
|
fn name(&self) -> String {
|
|
|
|
"mock".to_string()
|
|
|
|
}
|
|
|
|
|
2024-05-23 16:50:36 +01:00
|
|
|
async fn branches_get_all(&self) -> Result<Vec<config::BranchName>, git::branch::Error> {
|
2024-04-16 22:21:55 +01:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn file_contents_get(
|
|
|
|
&self,
|
2024-05-23 16:50:36 +01:00
|
|
|
_branch: &config::BranchName,
|
2024-04-16 22:21:55 +01:00
|
|
|
_file_path: &str,
|
2024-05-23 16:50:36 +01:00
|
|
|
) -> Result<String, git::file::Error> {
|
2024-04-16 22:21:55 +01:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
2024-05-23 08:30:58 +01:00
|
|
|
async fn commit_status(&self, _commit: &git::Commit) -> git::commit::Status {
|
2024-04-16 22:21:55 +01:00
|
|
|
todo!()
|
|
|
|
}
|
2024-04-19 18:56:42 +01:00
|
|
|
|
2024-05-23 16:50:36 +01:00
|
|
|
fn repo_clone(
|
|
|
|
&self,
|
|
|
|
_gitdir: config::GitDir,
|
|
|
|
) -> Result<OpenRepository, git::repository::Error> {
|
2024-04-19 18:56:42 +01:00
|
|
|
todo!()
|
|
|
|
}
|
2024-04-16 22:21:55 +01:00
|
|
|
}
|