git

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

Repository represents a git repository with additional functionality

func NewRepository

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

NewRepository creates a new Repository instance

func (*Repository) ApplyIgnorePatterns

func (r *Repository) ApplyIgnorePatterns(diff, basePath string) (string, error)

ApplyIgnorePatterns filters the diff content based on .caiignore files

func (*Repository) Commit added in v1.3.0

func (r *Repository) Commit(message string) error

Commit creates a new commit with the given message

func (*Repository) GetDiff

func (r *Repository) GetDiff() (string, error)

GetDiff returns the diff of staged changes, or unstaged changes if nothing is staged

func (*Repository) GetLastCommitMessage added in v1.3.0

func (r *Repository) GetLastCommitMessage() (string, error)

GetLastCommitMessage returns the message of the last commit

func (*Repository) StageAll added in v1.3.0

func (r *Repository) StageAll() error

StageAll stages all changes in the working directory

Jump to

Keyboard shortcuts

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