diff --git a/flake.lock b/flake.lock index 7dc5874..1f2cdd9 100644 --- a/flake.lock +++ b/flake.lock @@ -568,6 +568,22 @@ "type": "github" } }, + "nix-forgejo": { + "flake": false, + "locked": { + "lastModified": 1734486094, + "narHash": "sha256-WZ2vtxCItlfev7um8lBFzXtp7WYVHsDNrCnk1i8yLAU=", + "ref": "refs/heads/main", + "rev": "403b7bab1b5c37275ab946a5944c2caaf12eca78", + "revCount": 1, + "type": "git", + "url": "https://git.lix.systems/the-distro/nix-forgejo.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/the-distro/nix-forgejo.git" + } + }, "nix-gerrit": { "inputs": { "nixpkgs": [ @@ -809,6 +825,7 @@ "hydra", "lix" ], + "nix-forgejo": "nix-forgejo", "nix-gerrit": "nix-gerrit", "nixpkgs": "nixpkgs_2", "ofborg": "ofborg", diff --git a/flake.nix b/flake.nix index bad2325..d14c8bf 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,9 @@ nix-gerrit.url = "git+https://git.lix.systems/the-distro/nix-gerrit.git?ref=refs/heads/bump-minor-3_10"; nix-gerrit.inputs.nixpkgs.follows = "nixpkgs"; + nix-forgejo.url = "git+https://git.lix.systems/the-distro/nix-forgejo.git"; + nix-forgejo.flake = false; + ofborg.url = "git+https://git.lix.systems/the-distro/ofborg.git?ref=refs/heads/vcs-generalization"; ofborg.flake = false; diff --git a/pkgs/forgejo/branch-view_remove-expensive-commit-divergence-metric.patch b/pkgs/forgejo/branch-view_remove-expensive-commit-divergence-metric.patch deleted file mode 100644 index c4bb4c2..0000000 --- a/pkgs/forgejo/branch-view_remove-expensive-commit-divergence-metric.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/services/repository/branch.go b/services/repository/branch.go -index e1a313749f..5a8d823eef 100644 ---- a/services/repository/branch.go -+++ b/services/repository/branch.go -@@ -26,7 +26,6 @@ import ( - "code.gitea.io/gitea/modules/timeutil" - webhook_module "code.gitea.io/gitea/modules/webhook" - notify_service "code.gitea.io/gitea/services/notify" -- files_service "code.gitea.io/gitea/services/repository/files" - - "xorm.io/builder" - ) -@@ -129,21 +128,7 @@ func loadOneBranch(ctx context.Context, repo *repo_model.Repository, dbBranch *g - p := protectedBranches.GetFirstMatched(branchName) - isProtected := p != nil - -- var divergence *git.DivergeObject -- -- // it's not default branch -- if repo.DefaultBranch != dbBranch.Name && !dbBranch.IsDeleted { -- var err error -- divergence, err = files_service.CountDivergingCommits(ctx, repo, git.BranchPrefix+branchName) -- if err != nil { -- return nil, fmt.Errorf("CountDivergingCommits: %v", err) -- } -- } -- -- if divergence == nil { -- // tolerate the error that we cannot get divergence -- divergence = &git.DivergeObject{Ahead: -1, Behind: -1} -- } -+ divergence := &git.DivergeObject{Ahead: -1, Behind: -1} - - pr, err := issues_model.GetLatestPullRequestByHeadInfo(ctx, repo.ID, branchName) - if err != nil { -diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl -index a577fed450..e102796315 100644 ---- a/templates/repo/branch/list.tmpl -+++ b/templates/repo/branch/list.tmpl -@@ -102,19 +102,6 @@ - {{end}} - -