git

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available(ctx context.Context, workingDir string) bool

Available checks if the given directory is inside a git work tree.

func CurrentBranch

func CurrentBranch(ctx context.Context, workingDir string) (string, error)

CurrentBranch returns the current active branch in the repository.

func GitRunCmd

func GitRunCmd(ctx context.Context, dir string, name string, args ...string) string

GitRunCmd runs a git command and returns its output. It logs a warning on error.

func GitRunCmdErr

func GitRunCmdErr(ctx context.Context, dir string, name string, args ...string) error

GitRunCmdErr runs a git command and returns an error if it fails.

func GitRunCmdOutput

func GitRunCmdOutput(ctx context.Context, dir string, name string, args ...string) (string, error)

GitRunCmdOutput runs a git command and returns its combined stdout/stderr output.

func MountWorktree

func MountWorktree(ctx context.Context, workingDir, workspaceDir, branchName, baseBranch string) (string, error)

func RemoveWorktree

func RemoveWorktree(ctx context.Context, workingDir, workspaceDir string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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