Versions in this module Expand all Collapse all v0 v0.5.5 Apr 22, 2025 v0.5.4 Jan 29, 2025 v0.5.3 Jun 23, 2022 v0.5.2 Oct 15, 2021 v0.5.1 Sep 5, 2021 v0.5.0 Aug 31, 2021 v0.4.0 Aug 18, 2021 v0.3.0 Jan 15, 2021 v0.2.0 Apr 14, 2020 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