code: func (r *Repository) Log(o *LogOptions) (object.CommitIter, error) {
  	fn := commitIterFunc(o.Order)
  	if fn == nil {
  		return nil, fmt.Errorf("invalid Order=%v", o.Order)
  	}
  
  	var (
  		it  object.CommitIter
  		err error
  	)
  	if o.All {
  		it, err = r.logAll(fn)
  	} else {
  		it, err = r.log(o.From, fn)
  	}
  
  	if err != nil {
  		return nil, err
  	}
  
  	if o.FileName != nil {
  		// for `git log --all` also check parent (if the next commit comes from the real parent)
  		it = r.logWithFile(*o.FileName, it, o.All)
  	}
  
  	return it, nil
  }
docs: // Log returns the commit history from the given LogOptions.