Versions in this module Expand all Collapse all v5 v5.4.6 May 6, 2022 v5.4.5 Mar 19, 2022 Changes in this version + var ErrMalformedCommitGraphFile = errors.New("Malformed commit graph file") + var ErrUnsupportedHash = errors.New("Unsupported hash algorithm") + var ErrUnsupportedVersion = errors.New("Unsupported version") + type CommitData struct + Generation int + ParentHashes []plumbing.Hash + ParentIndexes []int + TreeHash plumbing.Hash + When time.Time + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(idx Index) error + type Index interface + GetCommitDataByIndex func(i int) (*CommitData, error) + GetIndexByHash func(h plumbing.Hash) (int, error) + Hashes func() []plumbing.Hash + func OpenFileIndex(reader io.ReaderAt) (Index, error) + type MemoryIndex struct + func NewMemoryIndex() *MemoryIndex + func (mi *MemoryIndex) Add(hash plumbing.Hash, commitData *CommitData) + func (mi *MemoryIndex) GetCommitDataByIndex(i int) (*CommitData, error) + func (mi *MemoryIndex) GetIndexByHash(h plumbing.Hash) (int, error) + func (mi *MemoryIndex) Hashes() []plumbing.Hash