aboutsummaryrefslogtreecommitdiffstats
path: root/models/git_diff.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-07 17:33:03 +0100
committerSandro Santilli <strk@kbt.io>2016-11-07 17:33:03 +0100
commitf14232d2e982b7e6021df1b3c001269fa652632f (patch)
tree61c0de365071edc1adb2b85068ac950b7664def8 /models/git_diff.go
parent60c82a87805821ad6eaf5aeb58a3a266b56a30ff (diff)
downloadgitea-f14232d2e982b7e6021df1b3c001269fa652632f.tar.gz
gitea-f14232d2e982b7e6021df1b3c001269fa652632f.zip
This one I overlooked before
Diffstat (limited to 'models/git_diff.go')
-rw-r--r--models/git_diff.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/git_diff.go b/models/git_diff.go
index ffe9d9e81d..8c1b47ab60 100644
--- a/models/git_diff.go
+++ b/models/git_diff.go
@@ -34,7 +34,7 @@ const (
DiffLinePlain DiffLineType = iota + 1
DiffLineAdd
DiffLineDel
- DIFF_LINE_SECTION
+ DiffLineSection
)
type DiffFileType uint8
@@ -43,7 +43,7 @@ const (
DiffFileAdd DiffFileType = iota + 1
DiffFileChange
DiffFileDel
- DIFF_FILE_RENAME
+ DiffFileRename
)
type DiffLine struct {
@@ -273,7 +273,7 @@ func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*
curSection = &DiffSection{}
curFile.Sections = append(curFile.Sections, curSection)
ss := strings.Split(line, "@@")
- diffLine := &DiffLine{Type: DIFF_LINE_SECTION, Content: line}
+ diffLine := &DiffLine{Type: DiffLineSection, Content: line}
curSection.Lines = append(curSection.Lines, diffLine)
// Parse line number.
@@ -362,7 +362,7 @@ func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*
case strings.HasPrefix(line, "index"):
curFile.Type = DiffFileChange
case strings.HasPrefix(line, "similarity index 100%"):
- curFile.Type = DIFF_FILE_RENAME
+ curFile.Type = DiffFileRename
curFile.IsRenamed = true
curFile.OldName = curFile.Name
curFile.Name = b