We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ee22f3 commit 9487daaCopy full SHA for 9487daa
gitdiff/parser.go
@@ -27,11 +27,12 @@ func Parse(r io.Reader) (<-chan *File, error) {
27
}
28
29
go func() {
30
+ defer close(out)
31
+
32
ph := &PatchHeader{}
33
for {
34
file, pre, err := p.ParseNextFileHeader()
35
if err != nil {
- out <- file
36
return
37
38
@@ -59,7 +60,6 @@ func Parse(r io.Reader) (<-chan *File, error) {
59
60
file.PatchHeader = ph
61
out <- file
62
- close(out)
63
}()
64
65
return out, nil
0 commit comments