Versions in this module Expand all Collapse all v0 v0.1.0 Oct 31, 2019 Changes in this version + const CommitHashLen + const Zero + func Fetch(gitDir, from, to string) error + func GetTreeSHA1(catter *ObjectCatter, commitSHA1 string) (string, error) + func LineRangesIntersect(elem LineRange, list []LineRange) bool + func MergeBase(gitDir string, one, two string) (res string, err error) + func UntrackedFiles(gitDir string) ([]string, error) + type BlameResult struct + Lines map[int]string + func Blame(gitDir string, refspec []string, filename string) (BlameResult, error) + type Change struct + LineRanges []LineRange + NewName string + OldLineRanges []LineRange + OldName string + Type ChangeType + Valid bool + func Diff(gitDir, workTreeDir string, refspec []string) ([]Change, error) + type ChangeType int + const Added + const Changed + const Deleted + func (c ChangeType) String() string + type Commit struct + Author string + Hash string + Message string + func Log(gitDir string, refspec []string) (res []Commit, err error) + type LineRange struct + From int + HaveRange bool + Range int + To int + func (r LineRange) HasPoint(point int) bool + type Object struct + Contents []byte + Type string + type ObjectCatter struct + func NewCatter(gitDir string) (*ObjectCatter, error) + func (o *ObjectCatter) Error() error + func (o *ObjectCatter) Get(sha1 string) (*Object, error) + func (o *ObjectCatter) Walk(dir string, treeSHA1 string, filenameFilter func(filename []byte) bool, ...) error