Skip to content

Last two lines of diff missing on commit page

Summary

Number of new lines shown on commit page differs from actual number of lines in new file. Last two lines of the file was not shown.

Steps to reproduce

Unknown, we pushed a commit as per normal and noticed that two lines were missing on the commit page when reviewing the code.

Example Project

See https://gitlab.com/cosmiqo/cosmiqo-web-hugo/commit/c29d290ba55ee9ad13279ab6ef7198a39b9a969c

This commit adds one file with 59 lines. On the above page, it shows "57 additions" and a diff with 57 lines. The last two lines are missing.

The content of file as of commit c29d290 shows that it has 59 lines, see https://gitlab.com/cosmiqo/cosmiqo-web-hugo/raw/c29d290b/content/article/on-cyberjaya.md

What is the current bug behavior?

Last two lines of diff is missing. Number of additions reported is incorrect.

What is the expected correct behavior?

All 59 lines should be shown in the diff, the number of additions reported should be 59 and not 57.

Output of checks

This bug happens on GitLab.com

Edited by Melvin Zhang