MCPcopy Create free account
hub / github.com/go-git/go-git / Hashes

Method Hashes

plumbing/format/commitgraph/memory.go:62–68  ·  view source on GitHub ↗

Hashes returns all the hashes that are available in the index

()

Source from the content-addressed store, hash-verified

60
61// Hashes returns all the hashes that are available in the index
62func (mi *MemoryIndex) Hashes() []plumbing.Hash {
63 hashes := make([]plumbing.Hash, 0, len(mi.indexMap))
64 for k := range mi.indexMap {
65 hashes = append(hashes, k)
66 }
67 return hashes
68}
69
70// Add adds new node to the memory index
71func (mi *MemoryIndex) Add(hash plumbing.Hash, commitData *CommitData) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected