code: func (mi *MemoryIndex) Add(hash plumbing.Hash, commitData *CommitData) {
  	// The parent indexes are calculated lazily in GetNodeByIndex
  	// which allows adding nodes out of order as long as all parents
  	// are eventually resolved
  	commitData.ParentIndexes = nil
  	mi.indexMap[hash] = len(mi.commitData)
  	mi.commitData = append(mi.commitData, commitData)
  }
docs: // Add adds new node to the memory index