code: func scanRefsToChan(scanner *GitScanner, pointerCb GitScannerFoundPointer, include, exclude []string, opt *ScanRefsOptions) error {
  	if opt == nil {
  		panic("no scan ref options")
  	}
  
  	revs, err := revListShas(include, exclude, opt)
  	if err != nil {
  		return err
  	}
  
  	lockableSet := &lockableNameSet{opt: opt, set: scanner.PotentialLockables}
  	smallShas, batchLockableCh, err := catFileBatchCheck(revs, lockableSet)
  	if err != nil {
  		return err
  	}
  
  	lockableCb := scanner.FoundLockable
  	if lockableCb == nil {
  		lockableCb = noopFoundLockable
  	}
  
  	go func(cb GitScannerFoundLockable, ch chan string) {
  		for name := range ch {
  			cb(name)
  		}
  	}(lockableCb, batchLockableCh)
  
  	pointers, checkLockableCh, err := catFileBatch(smallShas, lockableSet)
  	if err != nil {
  		return err
  	}
  
  	for p := range pointers.Results {
  		if name, ok := opt.GetName(p.Sha1); ok {
  			p.Name = name
  		}
  
  		if scanner.Filter.Allows(p.Name) {
  			pointerCb(p, nil)
  		}
  	}
  
  	for lockableName := range checkLockableCh {
  		if scanner.Filter.Allows(lockableName) {
  			lockableCb(lockableName)
  		}
  	}
  
  	if err := pointers.Wait(); err != nil {
  		pointerCb(nil, err)
  	}
  
  	return nil
  }
docs: // scanRefsToChan scans through all commits reachable by refs contained in
  // "include" and not reachable by any refs included in "excluded" and returns
  // a channel of WrappedPointer objects for all Git LFS pointers it finds.
  // Reports unique oids once only, not multiple times if >1 file uses the same content