Skip to content

Commit 16e54d7

Browse files
committed
Update documentation for ParseMultiFileDiff
1 parent 042635e commit 16e54d7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

diff/parse.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ import (
1212
"sourcegraph.com/sqs/pbtypes"
1313
)
1414

15-
// ParseMultiFileDiff parses a multi-file unified diff. It returns an error if parsing failed as a whole, but does its
16-
// best to parse as many files in the case of per-file errors. In the case of non-fatal per-file errors, the error
17-
// return value is null and the Errs field in the returned MultiFileDiff is set.
15+
// ParseMultiFileDiff parses a multi-file unified diff. It returns an error if
16+
// parsing failed as a whole, but does its best to parse as many files in the
17+
// case of per-file errors. If it cannot detect when the diff of the next file
18+
// begins, the hunks are added to the FileDiff of the previous file.
1819
func ParseMultiFileDiff(diff []byte) ([]*FileDiff, error) {
1920
return NewMultiFileDiffReader(bytes.NewReader(diff)).ReadAllFiles()
2021
}

0 commit comments

Comments
 (0)