Number of lines in the file off by one #12562

Closed
opened 2025-11-02 10:14:09 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @BenGH28 on GitHub (Feb 29, 2024).

Description

When looking at a file, the top shows the number of lines that the file has. When you look at the file itself, each line being number, it has one less line than what is reported at the top.

Gitea Version

1.21.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

my instance
image

on the test site
image

Git Version

2.40.1

Operating System

Ubuntu

How are you running Gitea?

docker image

Database

MySQL/MariaDB

Originally created by @BenGH28 on GitHub (Feb 29, 2024). ### Description When looking at a file, the top shows the number of lines that the file has. When you look at the file itself, each line being number, it has one less line than what is reported at the top. ### Gitea Version 1.21.7 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots my instance ![image](https://github.com/go-gitea/gitea/assets/45215137/226db03f-db7a-4368-8d78-8e3c2da775e3) on the test site ![image](https://github.com/go-gitea/gitea/assets/45215137/9fab8ac8-b160-436a-94b3-ab893e243743) ### Git Version 2.40.1 ### Operating System Ubuntu ### How are you running Gitea? docker image ### Database MySQL/MariaDB
GiteaMirror added the issue/duplicate label 2025-11-02 10:14:09 -06:00
Author
Owner

@silverwind commented on GitHub (Feb 29, 2024):

Should be in progress in https://github.com/go-gitea/gitea/pull/29260.

@silverwind commented on GitHub (Feb 29, 2024): Should be in progress in https://github.com/go-gitea/gitea/pull/29260.
Author
Owner

@delvh commented on GitHub (Feb 29, 2024):

Does not look related to me

@delvh commented on GitHub (Feb 29, 2024): Does not look related to me
Author
Owner

@silverwind commented on GitHub (Feb 29, 2024):

Does not look related to me

See https://github.com/go-gitea/gitea/pull/29260#issuecomment-1963164536 and replies.

@silverwind commented on GitHub (Feb 29, 2024): > Does not look related to me See https://github.com/go-gitea/gitea/pull/29260#issuecomment-1963164536 and replies.
Author
Owner

@yp05327 commented on GitHub (Mar 1, 2024):

maybe duplicate of #27377?

@yp05327 commented on GitHub (Mar 1, 2024): maybe duplicate of #27377?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12562