Skip to content

Commit 602c5da

Browse files
6543zeripath
authored andcommitted
Fix #9752 (#9769) (#9775)
Co-authored-by: zeripath <[email protected]>
1 parent 1980e59 commit 602c5da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/repofiles/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func DeleteRepoFile(repo *models.Repository, doer *models.User, opts *DeleteRepo
4646
// If we aren't branching to a new branch, make sure user can commit to the given branch
4747
if opts.NewBranch != opts.OldBranch {
4848
newBranch, err := repo.GetBranch(opts.NewBranch)
49-
if git.IsErrNotExist(err) {
49+
if err != nil && !git.IsErrBranchNotExist(err) {
5050
return nil, err
5151
}
5252
if newBranch != nil {

0 commit comments

Comments
 (0)