mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-15 10:16:03 +01:00
Move git references checking to gitrepo packages to reduce expose of repository path (#33891)
This commit is contained in:
@@ -34,7 +34,7 @@ func SetDefaultBranchPost(ctx *context.Context) {
|
||||
}
|
||||
|
||||
branch := ctx.FormString("branch")
|
||||
if err := repo_service.SetRepoDefaultBranch(ctx, ctx.Repo.Repository, ctx.Repo.GitRepo, branch); err != nil {
|
||||
if err := repo_service.SetRepoDefaultBranch(ctx, ctx.Repo.Repository, branch); err != nil {
|
||||
switch {
|
||||
case git_model.IsErrBranchNotExist(err):
|
||||
ctx.Status(http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user