History

Fix typos (#12542)

Gjergji Ramku committed 6 years ago

Commit 0c9eb461 parent d15bb174 files · +7 −7Browse files

Showing the changes to services/gitdiff/gitdiff.go (1 of 4 files). Show all

Unified · Split

services/gitdiff/gitdiff.go+3−3
@@ -89,8 +89,8 @@ type DiffLineSectionInfo struct { · 88 unmodified lines
89 RightHunkSize int89 RightHunkSize int
90}90}
91 91
92// BlobExceprtChunkSize represent max lines of excerpt92// BlobExcerptChunkSize represent max lines of excerpt
93const BlobExceprtChunkSize = 2093const BlobExcerptChunkSize = 20
94 94
95// GetType returns the type of a DiffLine.95// GetType returns the type of a DiffLine.
96func (d *DiffLine) GetType() int {96func (d *DiffLine) GetType() int {
@@ -139,7 +139,7 @@ func (d *DiffLine) GetExpandDirection() DiffLineExpandDirection { · 42 unmodified lines
139 }139 }
140 if d.SectionInfo.LastLeftIdx <= 0 && d.SectionInfo.LastRightIdx <= 0 {140 if d.SectionInfo.LastLeftIdx <= 0 && d.SectionInfo.LastRightIdx <= 0 {
141 return DiffLineExpandUp141 return DiffLineExpandUp
142 } else if d.SectionInfo.RightIdx-d.SectionInfo.LastRightIdx > BlobExceprtChunkSize && d.SectionInfo.RightHunkSize > 0 {142 } else if d.SectionInfo.RightIdx-d.SectionInfo.LastRightIdx > BlobExcerptChunkSize && d.SectionInfo.RightHunkSize > 0 {
143 return DiffLineExpandUpDown143 return DiffLineExpandUpDown
144 } else if d.SectionInfo.LeftHunkSize <= 0 && d.SectionInfo.RightHunkSize <= 0 {144 } else if d.SectionInfo.LeftHunkSize <= 0 && d.SectionInfo.RightHunkSize <= 0 {
145 return DiffLineExpandDown145 return DiffLineExpandDown