Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
6543 2020-01-15 01:41:28 +01:00 committed by Antoine GIRARD
parent 1980e59ac2
commit 602c5da953

View file

@ -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 {