diff options
author | luzpaz <luzpaz@users.noreply.github.com> | 2021-07-08 07:38:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 13:38:13 +0200 |
commit | e0296b6a6de6450c474fdf7fe62635a05beb49ab (patch) | |
tree | 1e924ac17324f60f6607e65cb51a325b948d1c62 /modules/git | |
parent | bc6f060b8cd89685cc32980c4f03cba58850cab1 (diff) | |
download | gitea-e0296b6a6de6450c474fdf7fe62635a05beb49ab.tar.gz gitea-e0296b6a6de6450c474fdf7fe62635a05beb49ab.zip |
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`
Diffstat (limited to 'modules/git')
-rw-r--r-- | modules/git/blame.go | 2 | ||||
-rw-r--r-- | modules/git/repo_commit.go | 10 | ||||
-rw-r--r-- | modules/git/repo_stats.go | 2 | ||||
-rw-r--r-- | modules/git/utils.go | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/modules/git/blame.go b/modules/git/blame.go index c2129c9e1c..fcbf183981 100644 --- a/modules/git/blame.go +++ b/modules/git/blame.go @@ -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 diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index 5b417cd774..16ee5b2fd6 100644 --- a/modules/git/repo_commit.go +++ b/modules/git/repo_commit.go @@ -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) diff --git a/modules/git/repo_stats.go b/modules/git/repo_stats.go index cb2a2bcf51..aca5ab21cc 100644 --- a/modules/git/repo_stats.go +++ b/modules/git/repo_stats.go @@ -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{} diff --git a/modules/git/utils.go b/modules/git/utils.go index d952189416..13926fba72 100644 --- a/modules/git/utils.go +++ b/modules/git/utils.go @@ -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{} |