Documentation ¶
Index ¶
- Variables
- func GetBlob(ref NamedReference, path string) ([]byte, error)
- func GetDiff(ref NamedReference) (object.FileStats, error)
- func GetLastCommit(ref NamedReference, paths ...string) (*object.Commit, error)
- func GetLog(ref NamedReference, nextRef NamedReference) ([]*object.Commit, error)
- func MakeTestRepository(t *testing.T) *git.Repository
- type NamedReference
- func GetBranchRef(g *git.Repository, ref string) (NamedReference, error)
- func GetCommitRef(g *git.Repository, ref string) (NamedReference, error)
- func GetDefaultBranch(g *git.Repository) (NamedReference, error)
- func GetNamedRef(g *git.Repository, ref string) (NamedReference, error)
- func GetTagRef(g *git.Repository, ref string) (NamedReference, error)
- type RepoConfig
- type RepoMap
- type SummaryData
- type TreeData
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFileNotFound = errors.New("File not found")
)
View Source
var (
ErrRefNotFound = errors.New("Ref not found")
)
Functions ¶
func GetLastCommit ¶
func GetLastCommit(ref NamedReference, paths ...string) (*object.Commit, error)
func GetLog ¶
func GetLog(ref NamedReference, nextRef NamedReference) ([]*object.Commit, error)
func MakeTestRepository ¶
MakeTestRepository returns an in-memory repository for testing
Types ¶
type NamedReference ¶
type NamedReference struct { Repository *git.Repository Name string Kind string Commit *object.Commit }
func GetBranchRef ¶
func GetBranchRef(g *git.Repository, ref string) (NamedReference, error)
func GetCommitRef ¶
func GetCommitRef(g *git.Repository, ref string) (NamedReference, error)
func GetDefaultBranch ¶
func GetDefaultBranch(g *git.Repository) (NamedReference, error)
func GetNamedRef ¶
func GetNamedRef(g *git.Repository, ref string) (NamedReference, error)
func GetTagRef ¶
func GetTagRef(g *git.Repository, ref string) (NamedReference, error)
func (NamedReference) Hash ¶
func (ref NamedReference) Hash() plumbing.Hash
func (NamedReference) Invalid ¶
func (ref NamedReference) Invalid() bool
type RepoConfig ¶
func (RepoConfig) Open ¶
func (rc RepoConfig) Open() (*git.Repository, error)
type SummaryData ¶
type SummaryData struct { NumCommits int NumBranches int NumTags int NumFiles int NumContributors int }
func GetSummary ¶
func GetSummary(ref NamedReference) (SummaryData, error)
Click to show internal directories.
Click to hide internal directories.