1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
This commit is contained in:
zeripath 2020-01-14 23:11:08 +00:00 committed by GitHub
parent cd5a44d973
commit d171cd41b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 we aren't branching to a new branch, make sure user can commit to the given branch
if opts.NewBranch != opts.OldBranch { if opts.NewBranch != opts.OldBranch {
newBranch, err := repo_module.GetBranch(repo, opts.NewBranch) newBranch, err := repo_module.GetBranch(repo, opts.NewBranch)
if git.IsErrNotExist(err) { if err != nil && !git.IsErrBranchNotExist(err) {
return nil, err return nil, err
} }
if newBranch != nil { if newBranch != nil {