loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[gitea] week 2025-12 cherry pick (gitea/main -> forgejo) (#7220)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7220
Reviewed-by: Gusted <gusted@noreply.codeberg.org>

+19 -23
-2
services/gitdiff/gitdiff.go
··· 1381 1381 "ignore-eol": {"--ignore-space-at-eol"}, 1382 1382 "show-all": nil, 1383 1383 } 1384 - 1385 1384 if flag, ok := whitespaceFlags[whitespaceBehavior]; ok { 1386 1385 return flag 1387 1386 } 1388 - log.Warn("unknown whitespace behavior: %q, default to 'show-all'", whitespaceBehavior) 1389 1387 return nil 1390 1388 }
+19 -15
services/repository/push.go
··· 23 23 repo_module "code.gitea.io/gitea/modules/repository" 24 24 "code.gitea.io/gitea/modules/setting" 25 25 "code.gitea.io/gitea/modules/timeutil" 26 + "code.gitea.io/gitea/modules/util" 26 27 issue_service "code.gitea.io/gitea/services/issue" 27 28 notify_service "code.gitea.io/gitea/services/notify" 28 29 pull_service "code.gitea.io/gitea/services/pull" ··· 133 134 } else { // is new tag 134 135 newCommit, err := gitRepo.GetCommit(opts.NewCommitID) 135 136 if err != nil { 136 - return fmt.Errorf("gitRepo.GetCommit(%s) in %s/%s[%d]: %w", opts.NewCommitID, repo.OwnerName, repo.Name, repo.ID, err) 137 - } 137 + // in case there is dirty data, for example, the "github.com/git/git" repository has tags pointing to non-existing commits 138 + if !errors.Is(err, util.ErrNotExist) { 139 + log.Error("Unable to get tag commit: gitRepo.GetCommit(%s) in %s/%s[%d]: %v", opts.NewCommitID, repo.OwnerName, repo.Name, repo.ID, err) 140 + } 141 + } else { 142 + commits := repo_module.NewPushCommits() 143 + commits.HeadCommit = repo_module.CommitToPushCommit(newCommit) 144 + commits.CompareURL = repo.ComposeCompareURL(objectFormat.EmptyObjectID().String(), opts.NewCommitID) 138 145 139 - commits := repo_module.NewPushCommits() 140 - commits.HeadCommit = repo_module.CommitToPushCommit(newCommit) 141 - commits.CompareURL = repo.ComposeCompareURL(objectFormat.EmptyObjectID().String(), opts.NewCommitID) 146 + notify_service.PushCommits( 147 + ctx, pusher, repo, 148 + &repo_module.PushUpdateOptions{ 149 + RefFullName: opts.RefFullName, 150 + OldCommitID: objectFormat.EmptyObjectID().String(), 151 + NewCommitID: opts.NewCommitID, 152 + }, commits) 142 153 143 - notify_service.PushCommits( 144 - ctx, pusher, repo, 145 - &repo_module.PushUpdateOptions{ 146 - RefFullName: opts.RefFullName, 147 - OldCommitID: objectFormat.EmptyObjectID().String(), 148 - NewCommitID: opts.NewCommitID, 149 - }, commits) 150 - 151 - addTags = append(addTags, tagName) 152 - notify_service.CreateRef(ctx, pusher, repo, opts.RefFullName, opts.NewCommitID) 154 + addTags = append(addTags, tagName) 155 + notify_service.CreateRef(ctx, pusher, repo, opts.RefFullName, opts.NewCommitID) 156 + } 153 157 } 154 158 } else if opts.RefFullName.IsBranch() { 155 159 if pusher == nil || pusher.ID != opts.PusherID {
-6
templates/base/head.tmpl
··· 20 20 <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml"> 21 21 <link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png"> 22 22 {{template "base/head_script" .}} 23 - <noscript> 24 - <style> 25 - .dropdown:hover > .menu { display: block; } 26 - .ui.secondary.menu .dropdown.item > .menu { margin-top: 0; } 27 - </style> 28 - </noscript> 29 23 {{template "shared/user/mention_highlight" .}} 30 24 {{template "base/head_opengraph" .}} 31 25 {{template "base/head_style" .}}