summaryrefslogtreecommitdiffstats
path: root/models/git_diff.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/git_diff.go')
-rw-r--r--models/git_diff.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/git_diff.go b/models/git_diff.go
index cf93af6959..8dd5a8c882 100644
--- a/models/git_diff.go
+++ b/models/git_diff.go
@@ -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),
}