Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGitRepository ¶
IsGitRepository checks if a path is a git repository
Types ¶
type Repository ¶
Repository represents a git repository
func NewRepository ¶
func NewRepository(path, name string) *Repository
NewRepository creates a new Repository instance
func (*Repository) Fetch ¶ added in v1.2.0
func (r *Repository) Fetch() error
Fetch runs git fetch to update remote tracking branches
func (*Repository) GetStatus ¶
func (r *Repository) GetStatus() (*Status, error)
GetStatus retrieves the git status of a repository
func (*Repository) SetUpstream ¶
func (r *Repository) SetUpstream() error
SetUpstream configures and pushes to set upstream tracking
type Status ¶
type Status struct {
Type StatusType
Message string
Symbol string
}
Status represents the git status of a repository
type StatusType ¶
type StatusType string
StatusType represents the type of git status
const ( StatusSync StatusType = "sync" StatusUnsync StatusType = "unsync" StatusError StatusType = "error" StatusIgnored StatusType = "ignored" StatusNoUpstream StatusType = "no_upstream" )
Click to show internal directories.
Click to hide internal directories.