command

package
v0.45.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinVersionGit    = 2.45
	MinVersionGitLFS = 3.5
)

Variables

View Source
var (
	ErrGitNotInstalled     = errors.New("git is not installed")
	ErrGitLFSNotInstalled  = errors.New("git-lfs is not installed")
	ErrGitVersionTooOld    = fmt.Errorf("git version must be %.2f or higher", MinVersionGit)
	ErrGitLFSVersionTooOld = fmt.Errorf("git-lfs version must be %.2f or higher", MinVersionGitLFS)
)

Functions

func CheckGitDependencies

func CheckGitDependencies() error

func FetchLFSObjects

func FetchLFSObjects(ctx context.Context, dir string) error

func HasLFSObjects

func HasLFSObjects(ctx context.Context, dir string) (int, error)

HasLFSObjects checks if the repository has any Git LFS objects and returns the count

func RunGitCommand

func RunGitCommand(ctx context.Context, dir string, env []string, args ...string) ([]byte, error)

func RunGitCommandWithAuth

func RunGitCommandWithAuth(ctx context.Context, dir string, auth Credentials, args ...string) ([]byte, error)

func RunGitLFSCommand

func RunGitLFSCommand(ctx context.Context, dir string, args ...string) ([]byte, error)

RunGitLFSCommand executes a git-lfs command with credentials and returns its output and error

Types

type Credentials

type Credentials struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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