MCPcopy
hub / github.com/git-lfs/git-lfs / ScanLFSFiles

Method ScanLFSFiles

lfs/gitscanner.go:225–236  ·  view source on GitHub ↗

ScanLFSFiles takes a ref, which points to HEAD, and returns WrappedPointer objects in the index or tree at that ref. Differs from ScanRefs in that multiple files in the tree with the same content are all reported.

(ref string, cb GitScannerFoundPointer)

Source from the content-addressed store, hash-verified

223// objects in the index or tree at that ref. Differs from ScanRefs in that
224// multiple files in the tree with the same content are all reported.
225func (s *GitScanner) ScanLFSFiles(ref string, cb GitScannerFoundPointer) error {
226 callback, err := firstGitScannerCallback(cb, s.foundPointer)
227 if err != nil {
228 return err
229 }
230
231 start := time.Now()
232 err = runScanLFSFiles(callback, ref, s.Filter, s.cfg.GitEnv(), s.cfg.OSEnv())
233 tracerx.PerformanceSince("ScanLFSFiles", start)
234
235 return err
236}
237
238// ScanUnpushed scans history for all LFS pointers which have been added but not
239// pushed to the named remote. remote can be left blank to mean 'any remote'.

Callers 2

checkoutCommandFunction · 0.95
pullFunction · 0.95

Calls 4

firstGitScannerCallbackFunction · 0.85
runScanLFSFilesFunction · 0.85
GitEnvMethod · 0.65
OSEnvMethod · 0.65

Tested by

no test coverage detected