scanSkipCont discards continuation lines that belong to a header scanHeaders chose to drop.
(s *commitScanner)
| 288 | // scanSkipCont discards continuation lines that belong to a header scanHeaders |
| 289 | // chose to drop. |
| 290 | func scanSkipCont(s *commitScanner) (commitState, error) { |
| 291 | line, err := s.readLine() |
| 292 | if err != nil && err != io.EOF { |
| 293 | return nil, err |
| 294 | } |
| 295 | if len(line) > 0 && line[0] == ' ' { |
| 296 | if err == io.EOF { |
| 297 | return nil, nil |
| 298 | } |
| 299 | return scanSkipCont, nil |
| 300 | } |
| 301 | if len(line) > 0 { |
| 302 | s.pushBack(line, err) |
| 303 | } |
| 304 | return scanHeaders, nil |
| 305 | } |
| 306 | |
| 307 | // scanExtraCont accumulates continuation lines for an unknown ExtraHeader |
| 308 | // whose value spans multiple lines, then finalises the entry once the |