### Description Related to: https://github.com/go-gitea/gitea/actions/runs/5086056277/jobs/9140155510 You can add the following test code in `TestEmptyRepoAddFileByAPI`: ``` golang req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/user30/empty?token=%s", token)) resp = session.MakeRequest(t, req, http.StatusOK) var apiRepo api.Repository DecodeJSON(t, resp, &apiRepo) assert.Equal(t, "new_branch", apiRepo.DefaultBranch) ``` Result:  No sure whether it is by design. But in web ui will have some bugs:    ps: not sure how to use this api correctly I got `repo is empty` error. But the file was uploaded successed.    ### Gitea Version latest ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? build ### Database None