cli

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package cli provides a subprocess-backed git backend for operations that rely on native git command behavior, including exec, inspection, write, merge, reset, stash, and maintenance workflows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend provides CLI-backed git operations.

func New

func New(root string, cfg *model.OpenOptions) *Backend

New constructs a CLI backend for root.

func (*Backend) Checkout

func (b *Backend) Checkout(target string, paths ...string) error

func (*Backend) CherryPick

func (b *Backend) CherryPick(revision string) error

func (*Backend) CherryPickAbort

func (b *Backend) CherryPickAbort() error

func (*Backend) CherryPickContinue

func (b *Backend) CherryPickContinue() error

func (*Backend) Clean

func (b *Backend) Clean(opts ...model.CleanOption) ([]string, error)

func (*Backend) CreateSignedTag

func (b *Backend) CreateSignedTag(name, target, message string, opts model.SignOptions) error

CreateSignedTag creates a signed annotated tag through git tag -s.

func (*Backend) Describe

func (b *Backend) Describe(revision string) (string, error)

func (*Backend) Exec

func (b *Backend) Exec(args ...string) ([]byte, error)

Exec runs the git CLI with the provided arguments in the repository root.

func (*Backend) Fsck

func (b *Backend) Fsck() error

func (*Backend) GC

func (b *Backend) GC() error

func (*Backend) Grep

func (b *Backend) Grep(pattern string, paths ...string) ([]model.GrepMatch, error)

func (*Backend) Merge

func (b *Backend) Merge(revision string) error

func (*Backend) MergeAbort

func (b *Backend) MergeAbort() error

func (*Backend) Prune

func (b *Backend) Prune() error

func (*Backend) Rebase

func (b *Backend) Rebase(onto string) error

func (*Backend) RebaseAbort

func (b *Backend) RebaseAbort() error

func (*Backend) RebaseContinue

func (b *Backend) RebaseContinue() error

func (*Backend) Reset

func (b *Backend) Reset(target string, mode model.ResetMode, paths ...string) error

func (*Backend) RevParse

func (b *Backend) RevParse(spec string) (model.Oid, error)

func (*Backend) Show

func (b *Backend) Show(spec string) ([]byte, error)

func (*Backend) StashList

func (b *Backend) StashList() ([]model.StashEntry, error)

func (*Backend) StashPop

func (b *Backend) StashPop(index int) error

func (*Backend) StashPush

func (b *Backend) StashPush(message string) error

Jump to

Keyboard shortcuts

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