Background task, must call waitg.Done() once at end
(gitscanner *lfs.GitScanner, ref string, retainChan chan string, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted)
| 386 | |
| 387 | // Background task, must call waitg.Done() once at end |
| 388 | func pruneTaskGetRetainedAtRef(gitscanner *lfs.GitScanner, ref string, retainChan chan string, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted) { |
| 389 | sem.Acquire(context.Background(), 1) |
| 390 | defer sem.Release(1) |
| 391 | defer waitg.Done() |
| 392 | |
| 393 | err := gitscanner.ScanTree(ref, func(p *lfs.WrappedPointer, err error) { |
| 394 | if err != nil { |
| 395 | errorChan <- err |
| 396 | return |
| 397 | } |
| 398 | |
| 399 | retainChan <- p.Oid |
| 400 | tracerx.Printf("RETAIN: %v via ref %v", p.Oid, ref) |
| 401 | }) |
| 402 | |
| 403 | if err != nil { |
| 404 | errorChan <- err |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | // Background task, must call waitg.Done() once at end |
| 409 | func pruneTaskGetPreviousVersionsOfRef(gitscanner *lfs.GitScanner, ref string, since time.Time, retainChan chan string, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted) { |
no test coverage detected