mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 14:53:34 +01:00
Remove duplicate empty repo check in delete branch API (#32569)
Found while working on #32433. This branch will never be executed because we have would have already made the same check a couple lines above. (cherry picked from commit 355889dbc2432554f0bcdb22f918488849f0016c)
This commit is contained in:
parent
f3afd18b76
commit
e9928b7577
1 changed files with 0 additions and 5 deletions
|
@ -133,11 +133,6 @@ func DeleteBranch(ctx *context.APIContext) {
|
|||
|
||||
branchName := ctx.Params("*")
|
||||
|
||||
if ctx.Repo.Repository.IsEmpty {
|
||||
ctx.Error(http.StatusForbidden, "", "Git Repository is empty.")
|
||||
return
|
||||
}
|
||||
|
||||
// check whether branches of this repository has been synced
|
||||
totalNumOfBranches, err := db.Count[git_model.Branch](ctx, git_model.FindBranchOptions{
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
|
|
Loading…
Reference in a new issue