NewMemoryIndex creates in-memory commit graph representation Deprecated: This package uses the wrong types for Generation and Index in CommitData. Use the v2 package instead.
()
| 19 | // Deprecated: This package uses the wrong types for Generation and Index in CommitData. |
| 20 | // Use the v2 package instead. |
| 21 | func NewMemoryIndex() *MemoryIndex { |
| 22 | return &MemoryIndex{ |
| 23 | indexMap: make(map[plumbing.Hash]int), |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | // GetIndexByHash gets the index in the commit graph from commit hash, if available |
| 28 | func (mi *MemoryIndex) GetIndexByHash(h plumbing.Hash) (int, error) { |
no outgoing calls