mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-24 07:13:33 +01:00
Backport #29450 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> (cherry picked from commit 2df38af752c13ca02a899d6a53848c68259d3336)
This commit is contained in:
parent
40c602df9b
commit
d97cd15a1b
1 changed files with 1 additions and 0 deletions
|
@ -654,6 +654,7 @@ func UpdateFile(ctx *context.APIContext) {
|
|||
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
|
||||
if ctx.Repo.Repository.IsEmpty {
|
||||
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
|
||||
return
|
||||
}
|
||||
|
||||
if apiOpts.BranchName == "" {
|
||||
|
|
Loading…
Reference in a new issue