GetIndexByHash gets the index in the commit graph from commit hash, if available
(h plumbing.Hash)
| 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) { |
| 29 | i, ok := mi.indexMap[h] |
| 30 | if ok { |
| 31 | return i, nil |
| 32 | } |
| 33 | |
| 34 | return 0, plumbing.ErrObjectNotFound |
| 35 | } |
| 36 | |
| 37 | // GetCommitDataByIndex gets the commit node from the commit graph using index |
| 38 | // obtained from child node, if available |
no outgoing calls
no test coverage detected