Skip to content

Commit 4b5a6e5

Browse files
authored
Fix typos (go-gitea#21947)
Two typos The `recieve` typo is also present in a translation. https://github.com/go-gitea/gitea/blob/5f38acd9a08958024e8bbf47bcc482c79d844e44/options/locale/locale_sv-SE.ini#L1760 Someone with a Crowdin account should fix that. ... and in a license file but I don't think we can change that because that's the official text. https://github.com/go-gitea/gitea/blob/5f38acd9a08958024e8bbf47bcc482c79d844e44/options/license/xinetd#L21
1 parent 5f38acd commit 4b5a6e5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/hook.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ Gitea or set your environment appropriately.`, "")
218218
}
219219
}
220220

221-
supportProcRecive := false
221+
supportProcReceive := false
222222
if git.CheckGitVersionAtLeast("2.29") == nil {
223-
supportProcRecive = true
223+
supportProcReceive = true
224224
}
225225

226226
for scanner.Scan() {
@@ -241,9 +241,9 @@ Gitea or set your environment appropriately.`, "")
241241
lastline++
242242

243243
// If the ref is a branch or tag, check if it's protected
244-
// if supportProcRecive all ref should be checked because
244+
// if supportProcReceive all ref should be checked because
245245
// permission check was delayed
246-
if supportProcRecive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) {
246+
if supportProcReceive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) {
247247
oldCommitIDs[count] = oldCommitID
248248
newCommitIDs[count] = newCommitID
249249
refFullNames[count] = refFullName

modules/base/tool.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func EncodeSha1(str string) string {
4343
return hex.EncodeToString(h.Sum(nil))
4444
}
4545

46-
// EncodeSha256 string to sha1 hex value.
46+
// EncodeSha256 string to sha256 hex value.
4747
func EncodeSha256(str string) string {
4848
h := sha256.New()
4949
_, _ = h.Write([]byte(str))

0 commit comments

Comments
 (0)