auths_sdk/ports/git_config.rs
1/// Error type for git configuration operations.
2#[derive(Debug, thiserror::Error)]
3pub enum GitConfigError {
4 /// The git config command failed with the given message.
5 #[error("git config command failed: {0}")]
6 CommandFailed(String),
7}
8
9/// Configures git settings for cryptographic signing.
10///
11/// Args:
12/// * `key` - The git config key (e.g., "gpg.format")
13/// * `value` - The value to set
14///
15/// Usage:
16/// ```ignore
17/// git_config.set("gpg.format", "ssh")?;
18/// ```
19pub trait GitConfigProvider: Send + Sync {
20 /// Set a global git config key to the given value.
21 fn set(&self, key: &str, value: &str) -> Result<(), GitConfigError>;
22}