tangled
alpha
login
or
join now
lewis.moe
/
tangled-core
forked from
tangled.org/core
1
fork
atom
Monorepo for Tangled
1
fork
atom
overview
issues
1
pulls
pipelines
appview: repo/index: sort default branch to always be on top
oppi.li
10 months ago
608444e7
84b0871b
+6
1 changed file
expand all
collapse all
unified
split
appview
state
repo.go
+6
appview/state/repo.go
···
94
94
if a.IsDefault {
95
95
return -1
96
96
}
97
97
+
if b.IsDefault {
98
98
+
return 1
99
99
+
}
97
100
if a.Commit != nil {
98
101
if a.Commit.Author.When.Before(b.Commit.Author.When) {
99
102
return 1
···
494
497
slices.SortFunc(result.Branches, func(a, b types.Branch) int {
495
498
if a.IsDefault {
496
499
return -1
500
500
+
}
501
501
+
if b.IsDefault {
502
502
+
return 1
497
503
}
498
504
if a.Commit != nil {
499
505
if a.Commit.Author.When.Before(b.Commit.Author.When) {