code: func pruneTaskGetReachableObjects(gitscanner *lfs.GitScanner, outObjectSet *tools.StringSet, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted) {
  	defer waitg.Done()
  
  	err := gitscanner.ScanAll(func(p *lfs.WrappedPointer, err error) {
  		sem.Acquire(context.Background(), 1)
  		defer sem.Release(1)
  
  		if err != nil {
  			errorChan <- err
  			return
  		}
  		outObjectSet.Add(p.Oid)
  	})
  
  	if err != nil {
  		errorChan <- err
  	}
  }
docs: // Background task, must call waitg.Done() once at end