Sfoglia il codice sorgente

Return 404 when tag is broken (#20017)

Fixes #19979
tags/v1.18.0-rc0
Wim 2 anni fa
parent
commit
439ace607d
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4
    0
      modules/context/repo.go

+ 4
- 0
modules/context/repo.go Vedi File

@@ -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…
Annulla
Salva