git-preview @ main

static git web frontend but with images and html previews + code truncation

sort tags and deduplicate

This sorts the tags reverse-chronologically.

If any tags have the same name (shouldn't happen but it does in some of my
repos), we use whichever one is "newer".

Signed-off-by: Derek Stevens <nilix@nilfm.cc>
Tue, 31 Jan 2023
1 files changed, 28 insertions(+), 0 deletions(-)
M git/git.go

@@ -2,6 +2,7 @@ package git

import ( "fmt" + "sort" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing"

@@ -11,6 +12,21 @@

type GitRepo struct { r *git.Repository h plumbing.Hash

… preview truncated