aboutsummaryrefslogtreecommitdiff
path: root/handle_repo_index.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-10 09:33:37 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-10 09:33:37 +0800
commita20fc6ee101bcf2a626c4b538f1820ca11022d4a (patch)
tree88701ccf1a171a01f45f25cd64369116c188c7fd /handle_repo_index.go
parent*.go: Reformat code (diff)
downloadforge-a20fc6ee101bcf2a626c4b538f1820ca11022d4a.tar.gz
forge-a20fc6ee101bcf2a626c4b538f1820ca11022d4a.tar.zst
forge-a20fc6ee101bcf2a626c4b538f1820ca11022d4a.zip
repo_index: Add anchors to filenames in the tree listing
Diffstat (limited to 'handle_repo_index.go')
-rw-r--r--handle_repo_index.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/handle_repo_index.go b/handle_repo_index.go
index ea8aeba..23dd334 100644
--- a/handle_repo_index.go
+++ b/handle_repo_index.go
@@ -27,6 +27,7 @@ func handle_repo_index(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Error getting repo HEAD: " + err.Error()))
return
}
+ data["ref"] = head.Name().Short()
head_hash := head.Hash()
commit_iter, err := repo.Log(&git.LogOptions{From: head_hash})
if err != nil {