mirror of
https://github.com/go-gitea/gitea
synced 2025-01-03 19:25:56 +01:00
Backport #29450 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
dc48eb070b
commit
2df38af752
@ -649,6 +649,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 New Issue
Block a user