Documentation ¶
Overview ¶
Package git shells out to gather information about the current repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
A Repository offers access to a handful of useful git commands.
func New ¶
func New(logger *hhlog.Logger) (*Repository, error)
New initializes and returns a Repository.
func (*Repository) All ¶
func (r *Repository) All() (Diff, error)
All returns all files in the repository, including untracked files, relative to the repository root.
func (*Repository) Canonicalize ¶
func (r *Repository) Canonicalize(commitish string) (string, error)
Canonicalize converts the supplied commitish to a SHA1.
func (*Repository) Diff ¶
func (r *Repository) Diff(since string) (Diff, error)
Diff returns the paths of files changed since the supplied commitish, relative to the repository root.
func (*Repository) Root ¶
func (r *Repository) Root() string
Root returns the absolute path to the repository root.
Click to show internal directories.
Click to hide internal directories.