code: func revListArgs(include, exclude []string, opt *ScanRefsOptions) (io.Reader, []string, error) {
  	var stdin io.Reader
  	args := []string{"rev-list", "--stdin"}
  	if !opt.CommitsOnly {
  		args = append(args, "--objects")
  	}
  
  	if opt.Reverse {
  		args = append(args, "--reverse")
  	}
  
  	if orderFlag, ok := opt.Order.Flag(); ok {
  		args = append(args, orderFlag)
  	}
  
  	switch opt.Mode {
  	case ScanRefsMode:
  		if opt.SkipDeletedBlobs {
  			args = append(args, "--no-walk")
  		} else {
  			args = append(args, "--do-walk")
  		}
  
  		stdin = strings.NewReader(strings.Join(
  			includeExcludeShas(include, exclude), "\n"))
  	case ScanAllMode:
  		args = append(args, "--all")
  	case ScanLeftToRemoteMode:
  		if len(opt.SkippedRefs) == 0 {
  			args = append(args, "--not", "--remotes="+opt.Remote)
  			stdin = strings.NewReader(strings.Join(
  				includeExcludeShas(include, exclude), "\n"))
  		} else {
  			stdin = strings.NewReader(strings.Join(
  				append(includeExcludeShas(include, exclude), opt.SkippedRefs...), "\n"),
  			)
  		}
  	default:
  		return nil, nil, errors.Errorf("unknown scan type: %d", opt.Mode)
  	}
  	return stdin, append(args, "--"), nil
  }
docs: // revListArgs returns the arguments for a given included and excluded set of
  // SHA1s, and ScanRefsOptions instance.
  //
  // In order, it returns the contents of stdin as an io.Reader, the args passed
  // to git as a []string, and any error encountered in generating those if one
  // occurred.