code: func pruneTaskGetRetainedAtRef(gitscanner *lfs.GitScanner, ref string, retainChan chan string, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted) {
  	sem.Acquire(context.Background(), 1)
  	defer sem.Release(1)
  	defer waitg.Done()
  
  	err := gitscanner.ScanRef(ref, func(p *lfs.WrappedPointer, err error) {
  
  		if err != nil {
  			errorChan <- err
  			return
  		}
  
  		retainChan <- p.Oid
  		tracerx.Printf("RETAIN: %v via ref %v", p.Oid, ref)
  	})
  
  	if err != nil {
  		errorChan <- err
  	}
  }
docs: // Background task, must call waitg.Done() once at end