Return 404 when tag is broken (#20024)

Fixes #19979
tokarchuk/v1.17
Wim 2 years ago committed by GitHub
parent 870d7f90e7
commit 36ccb8829b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/context/repo.go

@ -942,6 +942,10 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetTagCommit(refName)
if err != nil {
if git.IsErrNotExist(err) {
ctx.NotFound("GetTagCommit", err)
return
}
ctx.ServerError("GetTagCommit", err)
return
}

Loading…
Cancel
Save