Documentation
¶
Overview ¶
Package vcs holds the git/copy helpers shared by the plugin and skill installers. The functions are package-level vars so tests can inject fakes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Clone = func(url, ref, dest string) error { args := []string{"clone", "--depth", "1"} if ref != "" { args = append(args, "--branch", ref) } args = append(args, url, dest) cmd := exec.Command("git", args...) cmd.Stderr = os.Stderr return cmd.Run() }
Clone clones url (optionally at ref) into dest. Var for test injection.
View Source
var Pull = func(dir string) error { cmd := exec.Command("git", "-C", dir, "pull", "--ff-only") cmd.Stderr = os.Stderr return cmd.Run() }
Pull fast-forwards an existing checkout. Var for test injection.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.