pub fn config_unset(cwd: &Path, key: &str) -> Result<(), GitError>Expand description
Remove the latest value for the given key from the repository’s local config.
In-process equivalent of git config --unset <key>. Used by the LFS
agent’s disable-debug subcommand. Returns
GitError::ConfigKeyNotSet when the section or value is absent;
callers that want idempotent behaviour should match on that.
Divergence from git config --unset: native git refuses to unset a
multi-valued key (it requires --unset-all). gix-config removes
only the latest value. The keys this helper is used with
(lfs.customtransfer.<agent>.args) are single-valued in practice,
so the divergence is not observable here.
§Errors
Returns GitError::ConfigKeyParse if key is malformed,
GitError::Discover if the repository cannot be located,
GitError::ConfigParse if the existing config cannot be parsed,
GitError::ConfigKeyNotSet if the section or value is absent,
GitError::ConfigLock if the lock cannot be acquired, or
GitError::Io for other file I/O failures.