mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08: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:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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{}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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{}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user