Skip to main content

Vcs

Trait Vcs 

Source
pub trait Vcs: Send + Sync {
    // Required method
    fn commit(
        &self,
        paths: &[&Path],
        message: &str,
        ctx: &CommitContext<'_>,
    ) -> Result<String, VcsError>;
}
Expand description

VCS operations trait — minimal surface. Only commit is needed by the engine today. changes_since goes straight to gix::diff::tree without expanding this trait.

Required Methods§

Source

fn commit( &self, paths: &[&Path], message: &str, ctx: &CommitContext<'_>, ) -> Result<String, VcsError>

Stage the paths (typically a single mem directory) into the repo’s tree and create a commit on HEAD. message is the caller’s prose — the implementation appends the provenance trailers derived from ctx (Tool:, Actor:, Client:) and picks the author signature from ctx too. Returns the commit SHA. Each call rebuilds the tree from disk so deletions surface without callers having to track them.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§