mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00: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.
This commit is contained in:
		@@ -133,11 +133,6 @@ func DeleteBranch(ctx *context.APIContext) {
 | 
			
		||||
 | 
			
		||||
	branchName := ctx.PathParam("*")
 | 
			
		||||
 | 
			
		||||
	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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user