fix(config): deserialise gitdir as PathBuf, but expose it as GitDir
This commit is contained in:
parent
b71aece8c9
commit
ee8b1e9fce
1 changed files with 4 additions and 4 deletions
|
@ -171,7 +171,7 @@ impl Display for ForgeConfig {
|
|||
pub struct ServerRepoConfig {
|
||||
repo: String,
|
||||
branch: String,
|
||||
gitdir: Option<GitDir>,
|
||||
gitdir: Option<PathBuf>,
|
||||
main: Option<String>,
|
||||
next: Option<String>,
|
||||
dev: Option<String>,
|
||||
|
@ -199,8 +199,8 @@ impl ServerRepoConfig {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
pub const fn gitdir(&self) -> Option<&GitDir> {
|
||||
self.gitdir.as_ref()
|
||||
pub fn gitdir(&self) -> Option<GitDir> {
|
||||
self.gitdir.clone().map(GitDir)
|
||||
}
|
||||
}
|
||||
#[cfg(test)]
|
||||
|
@ -341,7 +341,7 @@ impl RepoDetails {
|
|||
repo_path: RepoPath(server_repo_config.repo.clone()),
|
||||
config: server_repo_config.repo_config(),
|
||||
branch: BranchName(server_repo_config.branch.clone()),
|
||||
gitdir: server_repo_config.gitdir().cloned(),
|
||||
gitdir: server_repo_config.gitdir(),
|
||||
forge: ForgeDetails {
|
||||
name: forge_name.clone(),
|
||||
forge_type: forge.forge_type.clone(),
|
||||
|
|
Loading…
Reference in a new issue