Gitea shows an extra non-existing blank line at the end of every file #1825

Closed
opened 2025-11-02 04:14:25 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @ghost on GitHub (May 26, 2018).

  • Gitea version (or commit ref): 1.4.1 and 2eabf18 (try.gitea.io)
  • Git version: 1.4.1 built with: bindata, sqlite
  • Operating system: Debian Stretch
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (example URL in description)
    • No
    • Not relevant
  • Log gist:

Description

When viewing any file in the repository, it shows an extra, blank line at the end that shouldn't be there. When using the web editor to change the file, the additional blank line is also there.

Example

On GitLab the file is shown correctly, with 3 lines:
https://gitlab.com/higan/higan/blob/master/.gitignore

1  higan/profile/WonderSwan.sys/internal.ram
2  higan/profile/WonderSwan Color.sys/internal.ram
3  docs_build/

But on Gitea, the same file is shown incorrectly with 4 lines:
https://try.gitea.io/giteauser/example/src/branch/master/.gitignore

1  higan/profile/WonderSwan.sys/internal.ram
2  higan/profile/WonderSwan Color.sys/internal.ram
3  docs_build/
4

If you clone the repo from Gitea and open the file in vim, it correctly has 3 lines:

  1 higan/profile/WonderSwan.sys/internal.ram
  2 higan/profile/WonderSwan Color.sys/internal.ram
  3 docs_build/
~
~
Originally created by @ghost on GitHub (May 26, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.4.1 and 2eabf18 (try.gitea.io) - Git version: 1.4.1 built with: bindata, sqlite - Operating system: Debian Stretch - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (example URL in description) - [ ] No - [ ] Not relevant - Log gist: ## Description When viewing any file in the repository, it shows an extra, blank line at the end that shouldn't be there. When using the web editor to change the file, the additional blank line is also there. ## Example On GitLab the file is shown **correctly**, with 3 lines: https://gitlab.com/higan/higan/blob/master/.gitignore ``` 1 higan/profile/WonderSwan.sys/internal.ram 2 higan/profile/WonderSwan Color.sys/internal.ram 3 docs_build/ ``` But on Gitea, the same file is shown **incorrectly** with 4 lines: https://try.gitea.io/giteauser/example/src/branch/master/.gitignore ``` 1 higan/profile/WonderSwan.sys/internal.ram 2 higan/profile/WonderSwan Color.sys/internal.ram 3 docs_build/ 4 ``` If you clone the repo from Gitea and open the file in vim, it correctly has 3 lines: ``` 1 higan/profile/WonderSwan.sys/internal.ram 2 higan/profile/WonderSwan Color.sys/internal.ram 3 docs_build/ ~ ~ ```
GiteaMirror added the topic/uitype/bug labels 2025-11-02 04:14:25 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1825