Documentation
¶
Overview ¶
Package repository provides functions to load information about a Git repository
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepositoryInfo ¶
type RepositoryInfo struct { Path string `json:"path"` // local path where the repository is located Url string `json:"url"` // Remote URL CurrentBranch string `json:"branch"` // current branch CurrentRevision string `json:"revision"` // current revision IsUpToDate bool `json:"is_up_to_date"` // True if there is no uncommitted changes in the local repository }
A RepositoryInfo represents data about an initialized Git repository
func LoadRepositoryInfo ¶
func LoadRepositoryInfo(path string) (*RepositoryInfo, error)
LoadRepositoryInfo loads Git repository information given a provided `path`.
It returns an error if the path doesn't exist or the path doesn't contain a valid Git repository.
Click to show internal directories.
Click to hide internal directories.