We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd5a44d commit d171cd4Copy full SHA for d171cd4
modules/repofiles/delete.go
@@ -47,7 +47,7 @@ func DeleteRepoFile(repo *models.Repository, doer *models.User, opts *DeleteRepo
47
// If we aren't branching to a new branch, make sure user can commit to the given branch
48
if opts.NewBranch != opts.OldBranch {
49
newBranch, err := repo_module.GetBranch(repo, opts.NewBranch)
50
- if git.IsErrNotExist(err) {
+ if err != nil && !git.IsErrBranchNotExist(err) {
51
return nil, err
52
}
53
if newBranch != nil {
0 commit comments