code: func rewriteOptions(args []string, opts *githistory.RewriteOptions, l *tasklog.Logger) (*githistory.RewriteOptions, error) {
  	include, exclude, err := includeExcludeRefs(l, args)
  	if err != nil {
  		return nil, err
  	}
  
  	return &githistory.RewriteOptions{
  		Include: include,
  		Exclude: exclude,
  
  		UpdateRefs:        opts.UpdateRefs,
  		Verbose:           opts.Verbose,
  		ObjectMapFilePath: opts.ObjectMapFilePath,
  
  		BlobFn:            opts.BlobFn,
  		TreePreCallbackFn: opts.TreePreCallbackFn,
  		TreeCallbackFn:    opts.TreeCallbackFn,
  	}, nil
  }
docs: // rewriteOptions returns *githistory.RewriteOptions able to be passed to a
  // *githistory.Rewriter that reflect the current arguments and flags passed to
  // an invocation of git-lfs-migrate(1).
  //
  // It is merged with the given "opts". In other words, an identical "opts" is
  // returned, where the Include and Exclude fields have been filled based on the
  // following rules:
  //
  // The included and excluded references are determined based on the output of
  // includeExcludeRefs (see below for documentation and detail).
  //
  // If any of the above could not be determined without error, that error will be
  // returned immediately.