List default branch first on refs page
1 files changed, 4 insertions(+), 1 deletions(-) M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +4 -1
@@ 409,7 409,10 @@ def refs(owner, repo): git_repo.branches[branch], git_repo.get(git_repo.branches[branch].target) ) for branch in git_repo.branches.local] branches = sorted(branches, key=lambda b: b[2].commit_time, reverse=True) default_branch = git_repo.default_branch().name branches = sorted(branches, key=lambda b: (b[1].name == default_branch, b[2].commit_time), reverse=True) results_per_page = 10 page = request.args.get("page")