mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 16:37:17 -04:00 
			
		
		
		
	* Fixed commit count (#17698) Added "Tag" label. Unified branch, tag and commit name. * Keep 1.15 behaviour. * Removed locale change.
This commit is contained in:
		| @@ -80,7 +80,7 @@ func Commits(ctx *context.Context) { | ||||
| 	ctx.Data["Username"] = ctx.Repo.Owner.Name | ||||
| 	ctx.Data["Reponame"] = ctx.Repo.Repository.Name | ||||
| 	ctx.Data["CommitCount"] = commitsCount | ||||
| 	ctx.Data["Branch"] = ctx.Repo.BranchName | ||||
| 	ctx.Data["RefName"] = ctx.Repo.RefName | ||||
|  | ||||
| 	pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) | ||||
| 	pager.SetDefaultParams(ctx) | ||||
| @@ -156,7 +156,7 @@ func Graph(ctx *context.Context) { | ||||
| 	ctx.Data["Username"] = ctx.Repo.Owner.Name | ||||
| 	ctx.Data["Reponame"] = ctx.Repo.Repository.Name | ||||
| 	ctx.Data["CommitCount"] = commitsCount | ||||
| 	ctx.Data["Branch"] = ctx.Repo.BranchName | ||||
| 	ctx.Data["RefName"] = ctx.Repo.RefName | ||||
| 	paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5) | ||||
| 	paginator.AddParam(ctx, "mode", "Mode") | ||||
| 	paginator.AddParam(ctx, "hide-pr-refs", "HidePRRefs") | ||||
| @@ -205,7 +205,7 @@ func SearchCommits(ctx *context.Context) { | ||||
| 	ctx.Data["Username"] = ctx.Repo.Owner.Name | ||||
| 	ctx.Data["Reponame"] = ctx.Repo.Repository.Name | ||||
| 	ctx.Data["CommitCount"] = commits.Len() | ||||
| 	ctx.Data["Branch"] = ctx.Repo.BranchName | ||||
| 	ctx.Data["RefName"] = ctx.Repo.RefName | ||||
| 	ctx.HTML(http.StatusOK, tplCommits) | ||||
| } | ||||
|  | ||||
| @@ -219,8 +219,7 @@ func FileHistory(ctx *context.Context) { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	branchName := ctx.Repo.BranchName | ||||
| 	commitsCount, err := ctx.Repo.GitRepo.FileCommitsCount(branchName, fileName) | ||||
| 	commitsCount, err := ctx.Repo.GitRepo.FileCommitsCount(ctx.Repo.RefName, fileName) | ||||
| 	if err != nil { | ||||
| 		ctx.ServerError("FileCommitsCount", err) | ||||
| 		return | ||||
| @@ -234,7 +233,7 @@ func FileHistory(ctx *context.Context) { | ||||
| 		page = 1 | ||||
| 	} | ||||
|  | ||||
| 	commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(branchName, fileName, page) | ||||
| 	commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(ctx.Repo.RefName, fileName, page) | ||||
| 	if err != nil { | ||||
| 		ctx.ServerError("CommitsByFileAndRange", err) | ||||
| 		return | ||||
| @@ -248,7 +247,7 @@ func FileHistory(ctx *context.Context) { | ||||
| 	ctx.Data["Reponame"] = ctx.Repo.Repository.Name | ||||
| 	ctx.Data["FileName"] = fileName | ||||
| 	ctx.Data["CommitCount"] = commitsCount | ||||
| 	ctx.Data["Branch"] = branchName | ||||
| 	ctx.Data["RefName"] = ctx.Repo.RefName | ||||
|  | ||||
| 	pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) | ||||
| 	pager.SetDefaultParams(ctx) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user