code: func NewCommitPreorderIter(
  	c *Commit,
  	seenExternal map[plumbing.Hash]bool,
  	ignore []plumbing.Hash,
  ) CommitIter {
  	seen := make(map[plumbing.Hash]bool)
  	for _, h := range ignore {
  		seen[h] = true
  	}
  
  	return &commitPreIterator{
  		seenExternal: seenExternal,
  		seen:         seen,
  		stack:        make([]CommitIter, 0),
  		start:        c,
  	}
  }
docs: // NewCommitPreorderIter returns a CommitIter that walks the commit history,
  // starting at the given commit and visiting its parents in pre-order.
  // The given callback will be called for each visited commit. Each commit will
  // be visited only once. If the callback returns an error, walking will stop
  // and will return the error. Other errors might be returned if the history
  // cannot be traversed (e.g. missing objects). Ignore allows to skip some
  // commits from being iterated.