Versions in this module Expand all Collapse all v5 v5.13.1 Jan 15, 2025 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") + func OpenChainFile(r io.Reader) ([]string, error) + type ChunkType int + const BaseGraphsListChunk + const BloomFilterDataChunk + const BloomFilterIndexChunk + const CommitDataChunk + const ExtraEdgeListChunk + const GenerationDataChunk + const GenerationDataOverflowChunk + const OIDFanoutChunk + const OIDLookupChunk + const ZeroChunk + func ChunkTypeFromBytes(b []byte) (ChunkType, bool) + func (ct ChunkType) Signature() []byte + type CommitData struct + Generation uint64 + GenerationV2 uint64 + ParentHashes []plumbing.Hash + ParentIndexes []uint32 + TreeHash plumbing.Hash + When time.Time + func (c *CommitData) GenerationV2Data() uint64 + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(idx Index) error + type Index interface + GetCommitDataByIndex func(i uint32) (*CommitData, error) + GetHashByIndex func(i uint32) (plumbing.Hash, error) + GetIndexByHash func(h plumbing.Hash) (uint32, error) + HasGenerationV2 func() bool + Hashes func() []plumbing.Hash + MaximumNumberOfHashes func() uint32 + func OpenChainIndex(fs billy.Filesystem) (Index, error) + func OpenChainOrFileIndex(fs billy.Filesystem) (Index, error) + func OpenFileIndex(reader ReaderAtCloser) (Index, error) + func OpenFileIndexWithParent(reader ReaderAtCloser, parent Index) (Index, error) + type MemoryIndex struct + func NewMemoryIndex() *MemoryIndex + func (mi *MemoryIndex) Add(hash plumbing.Hash, data *CommitData) + func (mi *MemoryIndex) Close() error + func (mi *MemoryIndex) GetCommitDataByIndex(i uint32) (*CommitData, error) + func (mi *MemoryIndex) GetHashByIndex(i uint32) (plumbing.Hash, error) + func (mi *MemoryIndex) GetIndexByHash(h plumbing.Hash) (uint32, error) + func (mi *MemoryIndex) HasGenerationV2() bool + func (mi *MemoryIndex) Hashes() []plumbing.Hash + func (mi *MemoryIndex) MaximumNumberOfHashes() uint32 + type ReaderAtCloser interface