1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Fix various documentation, user-facing, and source comment typos (#16367)

* Fix various doc, user-facing, and source comment typos

Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
This commit is contained in:
luzpaz
2021-07-08 07:38:13 -04:00
committed by GitHub
parent bc6f060b8c
commit e0296b6a6d
87 changed files with 132 additions and 132 deletions

View File

@ -34,7 +34,7 @@ type BlameReader struct {
var shaLineRegex = regexp.MustCompile("^([a-z0-9]{40})")
// NextPart returns next part of blame (sequencial code lines with the same commit)
// NextPart returns next part of blame (sequential code lines with the same commit)
func (r *BlameReader) NextPart() (*BlamePart, error) {
var blamePart *BlamePart

View File

@ -110,7 +110,7 @@ func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) (*list
}
}
// add commiters if present in search query
// add committers if present in search query
if len(opts.Committers) > 0 {
for _, v := range opts.Committers {
args = append(args, "--committer="+v)
@ -150,7 +150,7 @@ func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) (*list
stdout = append(stdout, '\n')
}
// if there are any keywords (ie not commiter:, author:, time:)
// if there are any keywords (ie not committer:, author:, time:)
// then let's iterate over them
if len(opts.Keywords) > 0 {
for _, v := range opts.Keywords {
@ -195,12 +195,12 @@ func (repo *Repository) FileChangedBetweenCommits(filename, id1, id2 string) (bo
return len(strings.TrimSpace(string(stdout))) > 0, nil
}
// FileCommitsCount return the number of files at a revison
// FileCommitsCount return the number of files at a revision
func (repo *Repository) FileCommitsCount(revision, file string) (int64, error) {
return CommitsCountFiles(repo.Path, []string{revision}, []string{file})
}
// CommitsByFileAndRange return the commits according revison file and the page
// CommitsByFileAndRange return the commits according revision file and the page
func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) (*list.List, error) {
skip := (page - 1) * setting.Git.CommitsRangeSize
@ -240,7 +240,7 @@ func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) (
return repo.parsePrettyFormatLogToList(stdout)
}
// CommitsByFileAndRangeNoFollow return the commits according revison file and the page
// CommitsByFileAndRangeNoFollow return the commits according revision file and the page
func (repo *Repository) CommitsByFileAndRangeNoFollow(revision, file string, page int) (*list.List, error) {
stdout, err := NewCommand("log", revision, "--skip="+strconv.Itoa((page-1)*50),
"--max-count="+strconv.Itoa(setting.Git.CommitsRangeSize), prettyLogFormat, "--", file).RunInDirBytes(repo.Path)

View File

@ -33,7 +33,7 @@ type CodeActivityAuthor struct {
Commits int64
}
// GetCodeActivityStats returns code statistics for acitivity page
// GetCodeActivityStats returns code statistics for activity page
func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string) (*CodeActivityStats, error) {
stats := &CodeActivityStats{}

View File

@ -13,7 +13,7 @@ import (
"sync"
)
// ObjectCache provides thread-safe cache opeations.
// ObjectCache provides thread-safe cache operations.
type ObjectCache struct {
lock sync.RWMutex
cache map[string]interface{}