Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating repo with one empty commit causes repository page to fail #16668

Closed
1 of 6 tasks
jotoho opened this issue Aug 11, 2021 · 0 comments · Fixed by #16812
Closed
1 of 6 tasks

Creating repo with one empty commit causes repository page to fail #16668

jotoho opened this issue Aug 11, 2021 · 0 comments · Fixed by #16812
Labels
Milestone

Comments

@jotoho
Copy link

jotoho commented Aug 11, 2021

  • Gitea version (or commit ref): 1.15.0+rc2 (deployed via docker)
  • Git version: 2.30.2 in server container; 2.32.0 on client PC
  • Operating system:
    • Docker container created from slightly outdated official image downloaded from Docker Hub (container is a few days old)
    • Host is Raspberry Pi 4 with 4GB RAM running the official 64-bit Raspberry Pi OS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io: (account activation link has yet to be delivered to my mailbox. Will test once I can create repos there.)
    • Yes (provide example URL)
    • No
  • Log gist: https://gist.github.com/jotoho/25b55e1c1c0a66202cb282822d79921e

Description

Creating an empty repository with the following commands:

git init
git commit --allow-empty -m "Initial commit"

and then pushing it to a new repository on gitea causes attempts to open the repo in the webinterface to fail with an "Internal Server Error" message. Creating and pushing a second commit with actual files causes the Webinterface to behave normally again.

For transparency: The gitea instance is running behind a HTTPS reverse proxy (Caddy) but I cannot imagine that having anything to do with this issue.

Screenshots

Screenshot_20210811_191750

@jotoho jotoho changed the title Creating repository with one empty commit causes repository page to fail Creating repo with one empty commit causes repository page to fail Aug 11, 2021
@noerw noerw added the type/bug label Aug 23, 2021
@noerw noerw added this to the 1.15.1 milestone Aug 23, 2021
zeripath added a commit to zeripath/gitea that referenced this issue Aug 24, 2021
Handle completely empty commit as the first commit to a repository.

Fix go-gitea#16668

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Aug 25, 2021
Backport go-gitea#16812

Handle completely empty commit as the first commit to a repository.

Fix go-gitea#16668

Signed-off-by: Andrew Thornton art27@cantab.net
zeripath added a commit that referenced this issue Aug 25, 2021
Backport #16812

Handle completely empty commit as the first commit to a repository.

Fix #16668

Signed-off-by: Andrew Thornton art27@cantab.net
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants