Documentation ¶
Index ¶
- type Repo
- func (repo *Repo) Branches() ([]string, error)
- func (repo *Repo) CheckLocal() bool
- func (repo *Repo) Checkout(revisionBranchOrTag string) error
- func (repo *Repo) Clone() error
- func (repo *Repo) Current() (string, error)
- func (repo *Repo) Date() (time.Time, error)
- func (repo *Repo) Fetch() error
- func (repo *Repo) HasChanges() bool
- func (repo *Repo) HasDetachedHead() bool
- func (repo *Repo) Init() error
- func (repo *Repo) Pull() error
- func (repo *Repo) Revision() (string, error)
- func (repo *Repo) Tags() ([]string, error)
- func (repo *Repo) TagsFromCommit(rev string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo provides access to a git repository.
func (*Repo) CheckLocal ¶
CheckLocal verifies the local location is a Git repo.
func (*Repo) Current ¶
Current returns the current branch/tag/revision. * Branch name if on the tip of the branch * Tag if on a tag * Otherwise a revision id
func (*Repo) HasChanges ¶
HasChanges returns true if changes are present.
func (*Repo) HasDetachedHead ¶
HasDetachedHead returns true if the repo is currently in a "detached head" state.
Click to show internal directories.
Click to hide internal directories.