Skip to content

Commit

Permalink
Fix #9752 (#9769)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored Jan 14, 2020
1 parent cd5a44d commit d171cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/repofiles/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func DeleteRepoFile(repo *models.Repository, doer *models.User, opts *DeleteRepo
// If we aren't branching to a new branch, make sure user can commit to the given branch
if opts.NewBranch != opts.OldBranch {
newBranch, err := repo_module.GetBranch(repo, opts.NewBranch)
if git.IsErrNotExist(err) {
if err != nil && !git.IsErrBranchNotExist(err) {
return nil, err
}
if newBranch != nil {
Expand Down

0 comments on commit d171cd4

Please sign in to comment.