0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-03-10 05:32:06 -05:00
Beyond coding. We forge.
Find a file
Giteabot 31c4a80979
Make gogit Repository.GetBranchNames consistent (#28348) (#28386)
Backport #28348 by @AdamMajer

nogogit GetBranchNames() lists branches sorted in reverse commit date
order. On the other hand the gogit implementation doesn't apply any
ordering resulting in unpredictable behaviour. In my case, the unit
tests requiring particular order fail

    repo_branch_test.go:24:
                Error Trace:
               ./gitea/modules/git/repo_branch_test.go:24
                Error:          elements differ

                                extra elements in list A:
                                ([]interface {}) (len=1) {
                                 (string) (len=6) "master"
                                }

                                extra elements in list B:
                                ([]interface {}) (len=1) {
                                 (string) (len=7) "branch1"
                                }

                                listA:
                                ([]string) (len=2) {
                                 (string) (len=6) "master",
                                 (string) (len=7) "branch2"
                                }

                                listB:
                                ([]string) (len=2) {
                                 (string) (len=7) "branch1",
                                 (string) (len=7) "branch2"
                                }
                Test:           TestRepository_GetBranches

To fix this, we sort branches based on their commit date in gogit
implementation.

Fixes: #28318

Co-authored-by: Adam Majer <amajer@suse.de>
(cherry picked from commit 272ae03341)
2023-12-08 13:41:16 +01:00
.devcontainer
.forgejo
.gitea
.github Check for v prefix on tags for release clean name (#28257) (#28270) 2023-12-08 13:40:59 +01:00
assets
build [I18N] Add Locale merger script (squash) abort on NOOP 2023-11-28 17:52:11 +01:00
cmd fixed duplicate attachments on dump on windows (#28019) (#28031) 2023-11-22 17:11:57 +01:00
contrib
custom/conf Change default size of issue/pr attachments and repo file (#27946) (#28017) 2023-11-22 17:11:57 +01:00
docker
docs Revert move installation/upgrade-from-gogs.md in 1.21 (#28235) 2023-12-08 13:40:59 +01:00
models handle repository.size column being NULL in migration v263 (#28336) (#28363) 2023-12-08 13:41:16 +01:00
modules Make gogit Repository.GetBranchNames consistent (#28348) (#28386) 2023-12-08 13:41:16 +01:00
options Fix wrong link in protect_branch_name_pattern_desc (#28313) (#28315) 2023-12-08 13:41:16 +01:00
public
releases/images
routers Fix object does not exist error when checking citation file (#28314) (#28369) 2023-12-08 13:41:16 +01:00
services Fix migration panic due to an empty review comment diff (#28334) (#28362) 2023-12-08 13:41:16 +01:00
snap
templates Fix margin in server signed signature verification view (#28379) (#28381) 2023-12-08 13:41:16 +01:00
tests Add HEAD support for rpm repo files (#28309) (#28360) 2023-12-08 13:41:16 +01:00
web_src Use appSubUrl for OAuth2 callback URL tip (#28266) (#28275) 2023-12-08 13:41:15 +01:00
.air.toml
.changelog.yml
.dockerignore
.editorconfig
.eslintrc.yaml
.gitattributes
.gitignore
.gitpod.yml
.golangci.yml
.ignore
.markdownlint.yaml
.npmrc
.spectral.yaml
.stylelintrc.yaml
.yamllint.yaml
BSDmakefile
build.go
CHANGELOG.md Change log for 1.21.1 (#28222) 2023-11-26 13:56:51 +01:00
CODEOWNERS
CONTRIBUTING.md
DCO
Dockerfile
Dockerfile.rootless
go.mod
go.sum
LICENSE
main.go
MAINTAINERS
Makefile [BRANDING] Replace branding in Swagger 2023-11-22 17:14:07 +01:00
package-lock.json
package.json
playwright.config.js
poetry.lock
poetry.toml
pyproject.toml
README.md
RELEASE-NOTES.md
vitest.config.js
webpack.config.js

Welcome to Forgejo

Hi there! Tired of big platforms playing monopoly? Providing Git hosting for your project, friends, company or community? Forgejo (/for'd͡ʒe.jo/ inspired by forĝejo the Esperanto word for forge) has you covered with its intuitive interface, light and easy hosting and a lot of builtin functionality.

Forgejo was created in 2022 because we think that the project should be owned by an independent community. If you second that, then Forgejo is for you! Our promise: Independent Free/Libre Software forever!

What does Forgejo offer?

If you like any of the following, Forgejo is literally meant for you:

  • Lightweight: Forgejo can easily be hosted on nearly every machine. Running on a Raspberry? Small cloud instance? No problem!
  • Project management: Besides Git hosting, Forgejo offers issues, pull requests, wikis, kanban boards and much more to coordinate with your team.
  • Publishing: Have something to share? Use releases to host your software for download, or use the package registry to publish it for docker, npm and many other package managers.
  • Customizable: Want to change your look? Change some settings? There are many config switches to make Forgejo work exactly like you want.
  • Powerful: Organizations & team permissions, CI integration, Code Search, LDAP, OAuth and much more. If you have advanced needs, Forgejo has you covered.
  • Privacy: From update checker to default settings: Forgejo is built to be privacy first for you and your crew.
  • Federation: (WIP) We are actively working to connect software forges with each other through ActivityPub, and create a collaborative network of personal instances.

Learn more

Dive into the documentation, subscribe to releases and blog post on our website, find us on the Fediverse or hop into our Matrix room if you have any questions or want to get involved.

Get involved

If you are interested in making Forgejo better, either by reporting a bug or by changing the governance, please take a look at the contribution guide.