bgit 0.4.2

User-friendly Git wrapper for beginners, automating essential tasks like adding, committing, and pushing changes. It includes smart rules to avoid common pitfalls, such as accidentally adding sensitive files or directories and has exclusive support for portable hooks!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use git2::Error;
use std::path::Path;

/// Trait for platform-specific SSH agent management behavior
pub trait SshAgentManager {
    /// Ensure an SSH agent is ready and available
    /// This method handles platform-specific agent setup and socket management
    fn ensure_agent_ready() -> Result<(), Error>;

    /// Start SSH agent in a detached manner
    /// Unix: Can bind to specific socket path
    /// Windows: Simple detached spawn
    /// Unsupported: Returns error
    fn start_agent_detached(socket_path: Option<&Path>) -> Result<(), Error>;
}