charmbracelet / soft-serve

The mighty, self-hostable Git server for the command line🍦
MIT License
5.16k stars 127 forks source link

Readme view displays Loading spinner in empty repo #522

Open oznogon opened 3 months ago

oznogon commented 3 months ago

Describe the bug

The Readme tab for an initialized but empty repository shows the Loading spinner despite the repo not containing a readme (or anything else).

To Reproduce

  1. Create a new repo on a Soft Serve server: ssh soft repository create bugtest
  2. Connect to the server: ssh soft
  3. Open the empty new bugtest repo.

Expected behavior

Soft Serve displays No readme found. as it does in populated repos that lack a readme.

image

Screenshots

Soft Serve displays a Loading spinner that never progresses.

image

The repo is confirmed to be empty.

image

$ git clone ssh://soft/bugtest
Cloning into 'bugtest'...
warning: You appear to have cloned an empty repository.

Workaround

Commit and push any file to the hosted repo and the Readme tab displays No readme found. as expected.

$ touch boog
$ git add boog
$ git commit -m "boog!"
[master (root-commit) 4b588cd] boog!
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 boog
$ git push -u origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 205 bytes | 205.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To ssh://soft/bugtest
 * [new branch]      master -> master
branch 'master' set up to track 'origin/master'.

image

image

Environment (please complete the following information):

Additional context

N/A