git-next/crates/core/src/git/mod.rs

56 lines
1.1 KiB
Rust
Raw Normal View History

//
pub mod commit;
pub mod fetch;
pub mod file;
pub mod forge;
mod generation;
mod git_ref;
mod git_remote;
pub mod push;
mod repo_details;
pub mod repository;
mod user_notification;
pub mod validation;
#[cfg(test)]
mod tests;
pub use commit::Commit;
pub use forge::ForgeLike;
pub use forge::MockForgeLike;
pub use generation::Generation;
#[allow(clippy::module_name_repetitions)]
pub use git_ref::GitRef;
#[allow(clippy::module_name_repetitions)]
pub use git_remote::GitRemote;
pub use repo_details::RepoDetails;
pub use repository::Repository;
pub use repository::RepositoryFactory;
pub use user_notification::UserNotification;
use crate::common::branch_name;
use crate::common::repo_alias;
use crate::common::repo_path;
use crate::ForgeDetails;
use crate::GitDir;
use crate::RepoConfig;
#[must_use]
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,
}
}