File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ import (
12
12
"sourcegraph.com/sqs/pbtypes"
13
13
)
14
14
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.
18
19
func ParseMultiFileDiff (diff []byte ) ([]* FileDiff , error ) {
19
20
return NewMultiFileDiffReader (bytes .NewReader (diff )).ReadAllFiles ()
20
21
}
You can’t perform that action at this time.
0 commit comments