Documentation
¶
Overview ¶
The git package contains functions for running git commands.
Index ¶
- type Change
- type Commit
- type Repository
- func (r *Repository) CreateTag(hash, name, message string, signed bool) error
- func (r *Repository) DeleteTags(tags []string) error
- func (r *Repository) Head() (Commit, error)
- func (r *Repository) PushTag(tag string, remote string) error
- func (r *Repository) PushTags(tags []string, remote string) error
- func (r *Repository) RevList(start, end string, paths ...string) ([]Commit, error)
- func (r *Repository) RevParse(rev string) (string, error)
- func (r *Repository) Tags(rev string, prefixes ...string) (tags []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository represents a git repository.
func New ¶
func New(path string) (*Repository, error)
New returns a new git Repo. If path is not a git repo, then an error will be returned.
func (*Repository) CreateTag ¶
func (r *Repository) CreateTag(hash, name, message string, signed bool) error
CreateTag tags a commit in a git repo.
If prefix is a non-empty string, then the version will be prefixed with that string.
func (*Repository) DeleteTags ¶
func (r *Repository) DeleteTags(tags []string) error
func (*Repository) Head ¶
func (r *Repository) Head() (Commit, error)
Head returns the commit at HEAD
func (*Repository) PushTag ¶
func (r *Repository) PushTag(tag string, remote string) error
PushTag pushes tag to remote.
func (*Repository) PushTags ¶
func (r *Repository) PushTags(tags []string, remote string) error
PushTags pushes tags to the remote repository remote.
Click to show internal directories.
Click to hide internal directories.