pub fn detect_backend(
repo_path: &Path,
vcs_override: Option<VcsOverride>,
) -> Result<Box<dyn VcsBackend>, Error>Expand description
Detect the appropriate VCS backend for a repository.
If vcs_override is Some(VcsOverride::Git), always uses git.
Otherwise, checks for .jj directory first (colocated repos),
then falls back to git.