code: func (idx *MemoryIndex) FindHash(o int64) (plumbing.Hash, error) {
  	var hash plumbing.Hash
  	var ok bool
  
  	if idx.offsetHash != nil {
  		if hash, ok = idx.offsetHash[o]; ok {
  			return hash, nil
  		}
  	}
  
  	// Lazily generate the reverse offset/hash map if required.
  	if !idx.offsetHashIsFull || idx.offsetHash == nil {
  		if err := idx.genOffsetHash(); err != nil {
  			return plumbing.ZeroHash, err
  		}
  
  		hash, ok = idx.offsetHash[o]
  	}
  
  	if !ok {
  		return plumbing.ZeroHash, plumbing.ErrObjectNotFound
  	}
  
  	return hash, nil
  }
docs: // FindHash implements the Index interface.