Skip to main content

GitRunner

Trait GitRunner 

Source
pub trait GitRunner: Send + Sync {
    // Required method
    fn run(
        &self,
        args: &[&str],
        cwd: &Path,
    ) -> impl Future<Output = Result<Output, WorktreeError>> + Send;
}
Expand description

Runs git sub-commands on behalf of WorktreeManager.

The cwd parameter is an explicit directory argument, making it safe to use from contexts where the process working directory has already been mutated by a CwdRestoreGuard (in zeph-subagent).

Implementors must be Send + Sync so they can be shared across async tasks.

Required Methods§

Source

fn run( &self, args: &[&str], cwd: &Path, ) -> impl Future<Output = Result<Output, WorktreeError>> + Send

Run git with the given args from the directory cwd.

Returns the raw Output so callers can inspect both stdout and stderr.

§Errors

Returns WorktreeError on I/O failure or timeout. Exit-code checking is the caller’s responsibility.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§