pub async fn detect_mode(
repo_path: &Path,
base_bookmark: Option<&str>,
) -> Result<Option<ModeInit>, SandboxError>Expand description
Detect a git repository during clone_repo and resolve its base revision.
This is the fallback mode: it claims every repository not claimed by an
earlier provider, and produces a helpful error (pointing at
open_sandbox_direct) when no commit can be resolved — e.g. for empty
repos or non-repository directories.