mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 12:16:17 +01:00
Return error in sha1CurrentPatternProcessor
Co-Authored-By: mrsdizzie <info@mrsdizzie.com>
This commit is contained in:
parent
74ed0feef8
commit
28f561cac4
1 changed files with 1 additions and 0 deletions
|
@ -664,6 +664,7 @@ func sha1CurrentPatternProcessor(ctx *postProcessCtx, node *html.Node) {
|
|||
// Because of this, we check to make sure that a matched hash is actually
|
||||
// a commit in the repository before making it a link.
|
||||
if _, err := git.NewCommand("rev-parse", "--verify", hash).RunInDirBytes(ctx.metas["repoPath"]); err != nil {
|
||||
log.Error("sha1CurrentPatternProcessor git rev-parse: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue