pub async fn probe_capabilities<R: GitRunner>(
runner: &R,
repo_root: &Path,
) -> Result<(), WorktreeError>Expand description
Probes that git is available and at a sufficient version, and that
repo_root is inside a git repository.
Must be called during bootstrap when worktree.enabled = true. Both checks
are skipped when worktrees are disabled.
§Errors
WorktreeError::NotAGitRepoifrepo_rootis not inside a git repo.WorktreeError::GitCommandifgitis not onPATHor is too old.
§Examples
use std::path::Path;
use zeph_worktree::{git_runner::DefaultGitRunner, manager::probe_capabilities};
let runner = DefaultGitRunner::new();
probe_capabilities(&runner, Path::new("/path/to/repo")).await?;