git-next/crates/git/src/common.rs

26 lines
518 B
Rust

//
use git_next_config::{
common::{branch_name, repo_alias, repo_path},
ForgeDetails, GitDir, RepoConfig,
};
use crate::{Generation, RepoDetails};
pub fn repo_details(
n: u32,
generation: Generation,
forge: ForgeDetails,
repo_config: Option<RepoConfig>,
gitdir: GitDir,
) -> RepoDetails {
RepoDetails {
generation,
repo_alias: repo_alias(n),
repo_path: repo_path(n),
gitdir,
branch: branch_name(n),
forge,
repo_config,
}
}