We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dced15 commit f82a805Copy full SHA for f82a805
services/gitdiff/gitdiff.go
@@ -344,7 +344,7 @@ func (diffFile *DiffFile) GetHighlightClass() string {
344
345
// GetTailSection creates a fake DiffLineSection if the last section is not the end of the file
346
func (diffFile *DiffFile) GetTailSection(gitRepo *git.Repository, leftCommitID, rightCommitID string) *DiffSection {
347
- if diffFile.Type != DiffFileChange || diffFile.IsBin || diffFile.IsLFSFile {
+ if len(diffFile.Sections) == 0 || diffFile.Type != DiffFileChange || diffFile.IsBin || diffFile.IsLFSFile {
348
return nil
349
}
350
leftCommit, err := gitRepo.GetCommit(leftCommitID)
0 commit comments