This commit is contained in:
Unknown 2014-05-13 12:40:32 -04:00
parent c117f9e73f
commit 98dbbae2ef
6 changed files with 7 additions and 6 deletions

View file

@ -49,6 +49,7 @@ type DiffSection struct {
type DiffFile struct {
Name string
Index int
Addition, Deletion int
Type int
IsBin bool
@ -144,6 +145,7 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
curFile = &DiffFile{
Name: a[strings.Index(a, "/")+1:],
Index: len(diff.Files) + 1,
Type: DIFF_FILE_CHANGE,
Sections: make([]*DiffSection, 0, 10),
}