Return error in sha1CurrentPatternProcessor

Co-Authored-By: mrsdizzie <info@mrsdizzie.com>
This commit is contained in:
Gary Kim 2019-08-06 01:30:02 +00:00 committed by GitHub
parent 74ed0feef8
commit 28f561cac4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 // Because of this, we check to make sure that a matched hash is actually
// a commit in the repository before making it a link. // a commit in the repository before making it a link.
if _, err := git.NewCommand("rev-parse", "--verify", hash).RunInDirBytes(ctx.metas["repoPath"]); err != nil { if _, err := git.NewCommand("rev-parse", "--verify", hash).RunInDirBytes(ctx.metas["repoPath"]); err != nil {
log.Error("sha1CurrentPatternProcessor git rev-parse: %v", err)
return return
} }