pub struct GitConfig {
pub read_only: Vec<String>,
pub allowed_with_config: Vec<String>,
pub config_env: HashMap<String, String>,
pub force_push_flags: Vec<String>,
}Expand description
Git subcommand evaluation rules.
Fields§
§read_only: Vec<String>Subcommands that are always allowed (e.g. status, log, diff, branch).
allowed_with_config: Vec<String>Subcommands that are allowed only when all config_env entries match
(e.g. push, pull when GIT_CONFIG_GLOBAL=~/.gitconfig.ai).
config_env: HashMap<String, String>Environment variable requirements for allowed_with_config subcommands.
Each entry maps a var name to its required value. All must match (AND).
Checked in the command’s inline env first, then the process environment.
When empty, the env-gating feature is disabled and those commands always ASK.
force_push_flags: Vec<String>Flags that indicate a force-push (e.g. --force, -f, --force-with-lease).
Force-pushes always require confirmation regardless of env-gating.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GitConfig
impl<'de> Deserialize<'de> for GitConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GitConfig
impl RefUnwindSafe for GitConfig
impl Send for GitConfig
impl Sync for GitConfig
impl Unpin for GitConfig
impl UnsafeUnpin for GitConfig
impl UnwindSafe for GitConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more