mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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> |
1 year ago | |
---|---|---|
.. | ||
actions | 2 years ago | |
activitypub | 1 year ago | |
analyze | 2 years ago | |
assetfs | 2 years ago | |
auth | 1 year ago | |
avatar | 2 years ago | |
base | 2 years ago | |
cache | 2 years ago | |
charset | 2 years ago | |
container | 2 years ago | |
context | 1 year ago | |
contexttest | 2 years ago | |
csv | 2 years ago | |
doctor | 1 year ago | |
emoji | 2 years ago | |
eventsource | 1 year ago | |
generate | 2 years ago | |
git | 1 year ago | |
gitgraph | 1 year ago | |
graceful | 2 years ago | |
hcaptcha | 2 years ago | |
highlight | 2 years ago | |
hostmatcher | 1 year ago | |
html | 2 years ago | |
httpcache | 2 years ago | |
httplib | 2 years ago | |
indexer | 1 year ago | |
issue/template | 2 years ago | |
json | 2 years ago | |
label | 2 years ago | |
lfs | 1 year ago | |
log | 2 years ago | |
markup | 1 year ago | |
mcaptcha | 2 years ago | |
metrics | 1 year ago | |
migration | 2 years ago | |
nosql | 2 years ago | |
options | 2 years ago | |
packages | 1 year ago | |
paginator | 2 years ago | |
pprof | 2 years ago | |
private | 2 years ago | |
process | 2 years ago | |
proxy | 2 years ago | |
proxyprotocol | 2 years ago | |
public | 2 years ago | |
queue | 1 year ago | |
recaptcha | 2 years ago | |
references | 1 year ago | |
regexplru | 2 years ago | |
repository | 1 year ago | |
secret | 2 years ago | |
session | 1 year ago | |
setting | 1 year ago | |
sitemap | 2 years ago | |
ssh | 1 year ago | |
storage | 1 year ago | |
structs | 1 year ago | |
svg | 2 years ago | |
sync | 2 years ago | |
system | 2 years ago | |
templates | 1 year ago | |
test | 2 years ago | |
testlogger | 2 years ago | |
timeutil | 2 years ago | |
translation | 2 years ago | |
turnstile | 2 years ago | |
typesniffer | 2 years ago | |
updatechecker | 2 years ago | |
upload | 2 years ago | |
uri | 2 years ago | |
user | 2 years ago | |
util | 1 year ago | |
validation | 2 years ago | |
web | 1 year ago | |
webhook | 2 years ago |