code: func (iter *TreeIter) ForEach(cb func(*Tree) error) error {
  	return iter.EncodedObjectIter.ForEach(func(obj plumbing.EncodedObject) error {
  		if obj.Type() != plumbing.TreeObject {
  			return nil
  		}
  
  		t, err := DecodeTree(iter.s, obj)
  		if err != nil {
  			return err
  		}
  
  		return cb(t)
  	})
  }
docs: // ForEach call the cb function for each tree contained on this iter until
  // an error happens or the end of the iter is reached. If ErrStop is sent
  // the iteration is stop but no error is returned. The iterator is closed.