vcsbackend

package
v1.9.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package vcsbackend exposes a single Detect entry point that returns the correct vcs.Backend (git or jujutsu) for a directory. It lives in its own package so cmd/agent-deck and internal/ui can share backend selection without re-declaring the gitBackend adapter (issue #1126).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWorktreeWithSetup

func CreateWorktreeWithSetup(backend vcs.Backend, worktreePath, branchName string, stdout, stderr io.Writer, setupTimeout time.Duration) (setupErr error, err error)

CreateWorktreeWithSetup creates a worktree via the backend. For git backends it also runs the per-repo worktree-setup script. For non-git backends (jujutsu) the worktree is created without running a setup script. Same semantics as cmd/agent-deck's createWorktreeWithSetup helper.

func Detect

func Detect(dir string) (vcs.Backend, error)

Detect returns the Backend for dir, preferring jujutsu when both jj and git are present (matching the cmd/agent-deck ordering established in PR #754).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL