Trait branchless::git::ConfigWrite[][src]

pub trait ConfigWrite {
    fn set(
        &mut self,
        key: impl AsRef<str>,
        value: impl Into<ConfigValue>
    ) -> Result<()>;
fn remove(&mut self, key: impl AsRef<str>) -> Result<()>;
fn set_multivar(
        &mut self,
        key: impl AsRef<str>,
        regex: impl AsRef<str>,
        value: impl AsRef<str>
    ) -> Result<()>;
fn remove_multivar(
        &mut self,
        key: impl AsRef<str>,
        regex: impl AsRef<str>
    ) -> Result<()>; }
Expand description

Write-only interface to Git’s configuration.

Required methods

Set the given config key to the given value.

Remove the given key from the configuration.

Add or set a multivariable entry with the given to the given value. If a key-value pair whose value matches the provided regex already exists, that entry is overwritten.

Remove the multivariable entry with the provided key and whose value matches the provided regex. If such a key is not present, does nothing.

Implementors