MCPcopy Index your code
hub / github.com/go-git/go-git / readLine

Method readLine

plumbing/object/commit_scanner.go:52–63  ·  view source on GitHub ↗

readLine returns the next line from the buffer, transparently consuming any line that was previously pushed back by a state that decided not to handle it.

()

Source from the content-addressed store, hash-verified

50// line that was previously pushed back by a state that decided not to handle
51// it.
52func (s *commitScanner) readLine() ([]byte, error) {
53 if s.pending != nil {
54 line, err := s.pending, s.pendingErr
55 s.pending, s.pendingErr = nil, nil
56 return line, err
57 }
58 line, err := s.r.ReadBytes('\n')
59 if err != nil && err != io.EOF {
60 return line, err
61 }
62 return line, err
63}
64
65// pushBack stashes an unconsumed line so the next state's readLine call sees
66// it. Only one line can be pushed back at a time.

Callers 9

scanTreeFunction · 0.45
scanParentsFunction · 0.45
scanAuthorFunction · 0.45
scanCommitterFunction · 0.45
scanHeadersFunction · 0.45
continuationContFunction · 0.45
scanSkipContFunction · 0.45
scanExtraContFunction · 0.45
scanMessageFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected