Documentation
¶
Index ¶
- type CommitsOptions
- type CommitsPageMeta
- type GitRepo
- func (g *GitRepo) Branches() ([]*plumbing.Reference, error)
- func (g *GitRepo) Commits(opts CommitsOptions) ([]*object.Commit, CommitsPageMeta, error)
- func (g *GitRepo) Diff() (*NiceDiff, error)
- func (g *GitRepo) File(path string) (*object.File, error)
- func (g *GitRepo) FileTree(path string) ([]NiceTree, error)
- func (g *GitRepo) FindMainBranch(branches []string) (string, error)
- func (g *GitRepo) Head() plumbing.Hash
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitsOptions ¶
type CommitsPageMeta ¶
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
func (*GitRepo) Commits ¶
func (g *GitRepo) Commits(opts CommitsOptions) ([]*object.Commit, CommitsPageMeta, error)
func (*GitRepo) FindMainBranch ¶
func (*GitRepo) Head ¶
Head returns hash of the tip. This is same to the hash of a commit object returned by LastCommit() method.
func (*GitRepo) Tags ¶
func (g *GitRepo) Tags() ([]*TagReference, error)
type NiceDiff ¶
type NiceDiff struct {
Commit *object.Commit
Parent *object.Commit
Stat struct {
FilesChanged int
Insertions int
Deletions int
}
Files []*gitdiff.File
}
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
Click to show internal directories.
Click to hide internal directories.