MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / pruneTaskGetRetainedIndex

Function pruneTaskGetRetainedIndex

commands/command_prune.go:567–583  ·  view source on GitHub ↗

Background task, must call waitg.Done() once at end

(gitscanner *lfs.GitScanner, ref string, workingDir string, retainChan chan string, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted)

Source from the content-addressed store, hash-verified

565
566// Background task, must call waitg.Done() once at end
567func pruneTaskGetRetainedIndex(gitscanner *lfs.GitScanner, ref string, workingDir string, retainChan chan string, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted) {
568 defer waitg.Done()
569
570 err := gitscanner.ScanIndex(ref, workingDir, func(p *lfs.WrappedPointer, err error) {
571 if err != nil {
572 errorChan <- err
573 } else {
574 retainChan <- p.Pointer.Oid
575 tracerx.Printf("RETAIN: %v index", p.Pointer.Oid)
576 }
577 })
578
579 if err != nil {
580 errorChan <- err
581 return
582 }
583}
584
585// Background task, must call waitg.Done() once at end
586func pruneTaskGetReachableObjects(gitscanner *lfs.GitScanner, outObjectSet *tools.StringSet, errorChan chan error, waitg *sync.WaitGroup, sem *semaphore.Weighted) {

Callers 1

Calls 2

ScanIndexMethod · 0.80
DoneMethod · 0.45

Tested by

no test coverage detected