git

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonDir

func CommonDir(ctx context.Context, r runner.Runner, workDir string) (string, error)

func ConfigGetLocal

func ConfigGetLocal(ctx context.Context, r runner.Runner, repoRoot string, key string) (string, error)

func DefaultBaseRef

func DefaultBaseRef(ctx context.Context, r runner.Runner, repoRoot string) string

func IsAncestor

func IsAncestor(ctx context.Context, r runner.Runner, repoRoot string, olderRef string, newerRef string) (bool, error)

func PrimaryWorktreeRoot

func PrimaryWorktreeRoot(ctx context.Context, r runner.Runner, workDir string) (string, error)

PrimaryWorktreeRoot returns the root directory of the "primary" worktree (the one that contains the common git directory). This is stable across linked worktrees, and prevents accidental nested worktree creation (e.g. <wt>/.wt/<a>/.wt/<b>...).

func RefExists

func RefExists(ctx context.Context, r runner.Runner, repoRoot string, ref string) (bool, error)

func RemoteBranches

func RemoteBranches(ctx context.Context, r runner.Runner, repoRoot string, remote string) ([]string, error)

func RemoteURL

func RemoteURL(ctx context.Context, r runner.Runner, repoRoot string, remote string) (string, error)

func RepoRoot

func RepoRoot(ctx context.Context, r runner.Runner, cwd string) (string, error)

func WorktreeAddExistingBranch

func WorktreeAddExistingBranch(ctx context.Context, r runner.Runner, repoRoot string, path string, branch string) error

func WorktreeAddNewBranch

func WorktreeAddNewBranch(ctx context.Context, r runner.Runner, repoRoot string, path string, branch string, startPoint string) error

func WorktreeList

func WorktreeList(ctx context.Context, r runner.Runner, repoRoot string) ([]worktree.Worktree, error)

func WorktreeListPorcelain

func WorktreeListPorcelain(ctx context.Context, r runner.Runner, repoRoot string) ([]byte, error)

func WorktreePrune

func WorktreePrune(ctx context.Context, r runner.Runner, repoRoot string) error

func WorktreeRemove

func WorktreeRemove(ctx context.Context, r runner.Runner, repoRoot string, path string, force bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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