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.
Click to show internal directories.
Click to hide internal directories.