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

Method Scan

lfs/diff_index_scanner.go:148–159  ·  view source on GitHub ↗

Scan advances the scan line and yields either a new value for Entry(), or an Err(). It returns true or false, whether or not it can continue scanning for more entries.

()

Source from the content-addressed store, hash-verified

146// Err(). It returns true or false, whether or not it can continue scanning for
147// more entries.
148func (s *DiffIndexScanner) Scan() bool {
149 if !s.prepareScan() {
150 return false
151 }
152
153 s.next, s.err = s.scan(s.from.Text())
154 if s.err != nil {
155 s.err = errors.Wrap(s.err, tr.Tr.Get("`git diff-index` scan"))
156 }
157
158 return s.err == nil
159}
160
161// Entry returns the last entry that was Scan()'d by the DiffIndexScanner.
162func (s *DiffIndexScanner) Entry() *DiffIndexEntry { return s.next }

Callers 1

revListIndexFunction · 0.95

Calls 4

prepareScanMethod · 0.95
scanMethod · 0.95
WrapFunction · 0.92
GetMethod · 0.65

Tested by

no test coverage detected