mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Add pager to the branches page (#14202)
* Add pager to the branches page * override pageSize if bigger than max * Make branches commit range configurable Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
		| @@ -110,6 +110,9 @@ func (repo *Repository) GetCommitByPath(relpath string) (*Commit, error) { | ||||
| // CommitsRangeSize the default commits range size | ||||
| var CommitsRangeSize = 50 | ||||
|  | ||||
| // BranchesRangeSize the default branches range size | ||||
| var BranchesRangeSize = 20 | ||||
|  | ||||
| func (repo *Repository) commitsByRange(id SHA1, page, pageSize int) (*list.List, error) { | ||||
| 	stdout, err := NewCommand("log", id.String(), "--skip="+strconv.Itoa((page-1)*pageSize), | ||||
| 		"--max-count="+strconv.Itoa(pageSize), prettyLogFormat).RunInDirBytes(repo.Path) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user