mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix numbr of files, total additions, and deletions (#11614)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -291,7 +291,7 @@ func Diff(ctx *context.Context) {
|
||||
ctx.Data["Author"] = models.ValidateCommitWithEmail(commit)
|
||||
ctx.Data["Diff"] = diff
|
||||
ctx.Data["Parents"] = parents
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0
|
||||
|
||||
if err := models.CalculateTrustStatus(verification, ctx.Repo.Repository, nil); err != nil {
|
||||
ctx.ServerError("CalculateTrustStatus", err)
|
||||
|
@@ -437,7 +437,7 @@ func PrepareCompareDiff(
|
||||
return false
|
||||
}
|
||||
ctx.Data["Diff"] = diff
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0
|
||||
|
||||
headCommit, err := headGitRepo.GetCommit(headCommitID)
|
||||
if err != nil {
|
||||
|
@@ -339,7 +339,7 @@ func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm) {
|
||||
return
|
||||
}
|
||||
|
||||
if diff.NumFiles() == 0 {
|
||||
if diff.NumFiles == 0 {
|
||||
ctx.PlainText(200, []byte(ctx.Tr("repo.editor.no_changes_to_show")))
|
||||
return
|
||||
}
|
||||
|
@@ -611,7 +611,7 @@ func ViewPullFiles(ctx *context.Context) {
|
||||
}
|
||||
|
||||
ctx.Data["Diff"] = diff
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0
|
||||
|
||||
baseCommit, err := ctx.Repo.GitRepo.GetCommit(startCommitID)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user