~edwargix/git.sr.ht

d768598c0e9444bc8006543aab7818d6a6296a71 — наб 2 years ago 6603c1a
/~o/r/refs/r: sort artifacts by filename

Now they're returned in SQL iteration order (by primary key?),
which sucks really bad if there's a few groups of similar artifacts
which get displayed in an effectively-random order
1 files changed, 1 insertions(+), 0 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +1 -0
@@ 630,6 630,7 @@ def ref(owner, repo, ref):
                .filter(Artifact.user_id == repo.owner_id)
                .filter(Artifact.repo_id == repo.id)
                .filter(Artifact.commit == tag.target.hex)).all()
        artifacts.sort(key=lambda ar: ar.filename)
        return render_template("ref.html", view="refs",
                owner=owner, repo=repo, git_repo=git_repo, tag=tag,
                signature=lookup_signature(git_repo, ref)[1],