Documentation
¶
Index ¶
- type Decoration
- type Diff
- type GitRepo
- func (g *GitRepo) Branches() ([]*plumbing.Reference, error)
- func (g *GitRepo) Commits() ([]*object.Commit, error)
- func (g *GitRepo) Decorations() map[string][]Decoration
- func (g *GitRepo) Diff() (*NiceDiff, error)
- func (g *GitRepo) FileContent(path string) (string, error)
- func (g *GitRepo) FileContentBytes(path string) ([]byte, error)
- func (g *GitRepo) FileTree(path string) ([]NiceTree, error)
- func (g *GitRepo) FindMainBranch(branches []string) (string, error)
- func (g *GitRepo) LastCommit() (*object.Commit, error)
- func (g *GitRepo) Tags() ([]*TagReference, error)
- func (g *GitRepo) WriteTar(w io.Writer, prefix string) error
- type NiceDiff
- type NiceTree
- type TagList
- type TagReference
- type TextFragment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoration ¶
Decoration is a ref label (HEAD, branch, tag) attached to a commit.
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
func (*GitRepo) Decorations ¶
func (g *GitRepo) Decorations() map[string][]Decoration
Decorations maps commit hashes to the refs pointing at them.
func (*GitRepo) FileContentBytes ¶
FileContentBytes returns the raw bytes of a blob, including binary files (unlike FileContent, which substitutes a placeholder).
func (*GitRepo) FindMainBranch ¶
func (*GitRepo) Tags ¶
func (g *GitRepo) Tags() ([]*TagReference, error)
type NiceDiff ¶
type NiceDiff struct {
Commit struct {
Message string
Author object.Signature
This string
Parent string
}
Stat struct {
FilesChanged int
Insertions int
Deletions int
}
Diff []Diff
}
A nicer git diff representation.
type TagList ¶
type TagList struct {
// contains filtered or unexported fields
}
type TagReference ¶
type TagReference struct {
// contains filtered or unexported fields
}
TagReference is used to list both tag and non-annotated tags. Non-annotated tags should only contains a reference. Annotated tags should contain its reference and its tag information.
func (*TagReference) Message ¶
func (t *TagReference) Message() string
func (*TagReference) Name ¶
func (t *TagReference) Name() string
type TextFragment ¶
Click to show internal directories.
Click to hide internal directories.