use crate::{
config,
config::tree::{Init, Key, Section, extensions, keys},
};
impl Init {
pub const DEFAULT_BRANCH: keys::Any = keys::Any::new("defaultBranch", &config::Tree::INIT)
.with_deviation("If not set, we use `main` instead of `master`");
pub const DEFAULT_OBJECT_FORMAT: extensions::ObjectFormat =
extensions::ObjectFormat::new_object_format("defaultObjectFormat", &config::Tree::INIT)
.with_environment_override("GIT_DEFAULT_HASH")
.with_deviation("Invalid values are an error, whereas `git` only warns about invalid configuration");
}
impl Section for Init {
fn name(&self) -> &str {
"init"
}
fn keys(&self) -> &[&dyn Key] {
&[&Self::DEFAULT_BRANCH, &Self::DEFAULT_OBJECT_FORMAT]
}
}