git

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloneOptions added in v0.2.27

type CloneOptions struct {
	// Depth limits the clone to the specified number of commits (0 = full clone)
	Depth int
}

CloneOptions contains options for cloning a repository

type ProgressCallback

type ProgressCallback func(message string)

ProgressCallback is called to report progress during git operations

type Repository

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

Repository manages local git repository operations using go-git

func NewRepository

func NewRepository(baseDir string) (*Repository, error)

NewRepository creates a new repository manager

func (*Repository) EnsureClonedWithOptions added in v0.2.27

func (r *Repository) EnsureClonedWithOptions(ctx context.Context, owner, name, token string, opts *CloneOptions) error

EnsureClonedWithOptions ensures a repository is cloned with specific options

func (*Repository) FetchCommits

func (r *Repository) FetchCommits(ctx context.Context, owner, name string, since, until *time.Time) ([]models.Commit, error)

FetchCommits retrieves commits from the local repository using go-git

func (*Repository) SetProgressCallback

func (r *Repository) SetProgressCallback(cb ProgressCallback)

SetProgressCallback sets the callback function for progress reporting

Jump to

Keyboard shortcuts

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