Showing the changes to services/gitdiff/gitdiff.go (1 of 4 files). Show all
Unified · Split
| @@ -89,8 +89,8 @@ type DiffLineSectionInfo struct { · 88 unmodified lines | ||
| 89 | 89 | RightHunkSize int |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | −// BlobExceprtChunkSize represent max lines of excerpt | |
| 93 | −const BlobExceprtChunkSize = 20 | |
| 92 | +// BlobExcerptChunkSize represent max lines of excerpt | |
| 93 | +const BlobExcerptChunkSize = 20 | |
| 94 | 94 | |
| 95 | 95 | // GetType returns the type of a DiffLine. |
| 96 | 96 | func (d *DiffLine) GetType() int { |
| @@ -139,7 +139,7 @@ func (d *DiffLine) GetExpandDirection() DiffLineExpandDirection { · 42 unmodified lines | ||
| 139 | 139 | } |
| 140 | 140 | if d.SectionInfo.LastLeftIdx <= 0 && d.SectionInfo.LastRightIdx <= 0 { |
| 141 | 141 | 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 | 143 | return DiffLineExpandUpDown |
| 144 | 144 | } else if d.SectionInfo.LeftHunkSize <= 0 && d.SectionInfo.RightHunkSize <= 0 { |
| 145 | 145 | return DiffLineExpandDown |