mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-09-12 01:41:32 +02: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
|
@ -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