git

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 6 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 {
	Path        string `yaml:"path,omitempty"`
	URL         string `yaml:"url"`
	Target      string `yaml:"target,omitempty"`
	ManifestDir string `yaml:"manifest_dir,omitempty"`
	// 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 NewRepository

func NewRepository(repository config.Repository) *Repository

NewRepository creates a new Repository instance with the given local path and remote URL. The repository is not initialized until SyncRepository is called.

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.

Jump to

Keyboard shortcuts

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