summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-01-14 23:11:08 +0000
committerGitHub <noreply@github.com>2020-01-14 23:11:08 +0000
commitd171cd41b178874ce22791c07d35283b126ebdf3 (patch)
tree2f0e294aa9124cbe25141f5b33d892f577f4222e
parentcd5a44d973735b2e1cb4b9d3044e120fd0f7b521 (diff)
downloadgitea-d171cd41b178874ce22791c07d35283b126ebdf3.tar.gz
gitea-d171cd41b178874ce22791c07d35283b126ebdf3.zip
Fix #9752 (#9769)
-rw-r--r--modules/repofiles/delete.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/repofiles/delete.go b/modules/repofiles/delete.go
index f774b375a5..c91f597f9a 100644
--- a/modules/repofiles/delete.go
+++ b/modules/repofiles/delete.go
@@ -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 {