aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-02-27 23:09:13 +0800
committerGitHub <noreply@github.com>2024-02-27 15:09:13 +0000
commite9f4c2db8291c54044345aebd9381ac820ed9687 (patch)
treecf0a4d71f890b710b4bb8c9460236eeb013710b3
parent9a8c90ee18095d284192476834d5d23074d136f3 (diff)
downloadgitea-e9f4c2db8291c54044345aebd9381ac820ed9687.tar.gz
gitea-e9f4c2db8291c54044345aebd9381ac820ed9687.zip
Fix missed return (#29450)
-rw-r--r--routers/api/v1/repo/file.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 907a5b568e..4895f7b1b3 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -655,6 +655,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 == "" {