Skip to content

Commit

Permalink
Return 404 when tag is broken (go-gitea#20017)
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim authored and AbdulrhmnGhanem committed Aug 23, 2022
1 parent 9b8f2a7 commit 36993eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/context/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 36993eb

Please sign in to comment.