diff --git a/cmd/hook.go b/cmd/hook.go index 3970d27cf2..83fcd93915 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -218,9 +218,9 @@ Gitea or set your environment appropriately.`, "") } } - supportProcRecive := false + supportProcReceive := false if git.CheckGitVersionAtLeast("2.29") == nil { - supportProcRecive = true + supportProcReceive = true } for scanner.Scan() { @@ -241,9 +241,9 @@ Gitea or set your environment appropriately.`, "") lastline++ // If the ref is a branch or tag, check if it's protected - // if supportProcRecive all ref should be checked because + // if supportProcReceive all ref should be checked because // permission check was delayed - if supportProcRecive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) { + if supportProcReceive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) { oldCommitIDs[count] = oldCommitID newCommitIDs[count] = newCommitID refFullNames[count] = refFullName diff --git a/modules/base/tool.go b/modules/base/tool.go index f1e4a3bf97..df0947ec61 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -43,7 +43,7 @@ func EncodeSha1(str string) string { return hex.EncodeToString(h.Sum(nil)) } -// EncodeSha256 string to sha1 hex value. +// EncodeSha256 string to sha256 hex value. func EncodeSha256(str string) string { h := sha256.New() _, _ = h.Write([]byte(str))