Browse Source

Fix #9752 (#9769) (#9775)

Co-authored-by: zeripath <art27@cantab.net>
tags/v1.11.0-rc2
6543 6 years ago committed by Antoine GIRARD
parent
commit
602c5da953
  1. 2
      modules/repofiles/delete.go

2
modules/repofiles/delete.go

@ -46,7 +46,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.GetBranch(opts.NewBranch)
if git.IsErrNotExist(err) {
if err != nil && !git.IsErrBranchNotExist(err) {
return nil, err
}
if newBranch != nil {

Loading…
Cancel
Save