Documentation
¶
Overview ¶
Package git provides git repository management functionality for quad-ops
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
config.Repository
Path string
// contains filtered or unexported fields
}
Repository represents a Git repository with its local path, remote URL, and an instance of the underlying git repository.
func NewGitRepository ¶ added in v0.3.0
func NewGitRepository(repository config.Repository, configProvider config.Provider) *Repository
NewGitRepository creates a new Repository instance with explicit config provider.
func NewGitRepositoryWithLogger ¶ added in v0.21.0
func NewGitRepositoryWithLogger(repository config.Repository, configProvider config.Provider, logger log.Logger) *Repository
NewGitRepositoryWithLogger creates a new Repository instance with explicit dependencies.
func (*Repository) GetCurrentCommitHash ¶ added in v0.24.1
func (r *Repository) GetCurrentCommitHash() (string, error)
GetCurrentCommitHash returns the current HEAD commit hash.
func (*Repository) SyncRepository ¶
func (r *Repository) SyncRepository() error
SyncRepository clones the remote repository to the local path if it doesn't exist, or opens the existing repository and pulls the latest changes if it does. It returns an error if any Git operations fail.