Skip to content

Commit

Permalink
Clarify that Parse expects a single patch
Browse files Browse the repository at this point in the history
  • Loading branch information
bluekeyes committed Feb 25, 2024
1 parent 981bc4b commit 13e8639
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gitdiff/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import (
// Parse parses a patch with changes to one or more files. Any content before
// the first file is returned as the second value. If an error occurs while
// parsing, it returns all files parsed before the error.
//
// Parse expects to receive a single patch. If the input may contain multiple
// patches (for example, if it is an mbox file), callers should split it into
// individual patches and call Parse on each one.
func Parse(r io.Reader) ([]*File, string, error) {
p := newParser(r)

Expand Down

0 comments on commit 13e8639

Please sign in to comment.