From 17c676d4b366c983966366db4a821179d8975bd2 Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 30 Apr 2025 21:03:16 +0100 Subject: [PATCH] appview: repo: update tagmap to work on annotated tags annotated tags have their own custom hashes, but the "target" of the tag points to the commit they refer to. --- appview/state/repo.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appview/state/repo.go b/appview/state/repo.go index 4442ad5d..88edeedc 100644 --- a/appview/state/repo.go +++ b/appview/state/repo.go @@ -74,6 +74,9 @@ func (s *State) RepoIndex(w http.ResponseWriter, r *http.Request) { tagMap := make(map[string][]string) for _, tag := range result.Tags { hash := tag.Hash + if tag.Tag != nil { + hash = tag.Tag.Target.String() + } tagMap[hash] = append(tagMap[hash], tag.Name) } @@ -189,6 +192,9 @@ func (s *State) RepoLog(w http.ResponseWriter, r *http.Request) { tagMap := make(map[string][]string) for _, tag := range result.Tags { hash := tag.Hash + if tag.Tag != nil { + hash = tag.Tag.Target.String() + } tagMap[hash] = append(tagMap[hash], tag.Name) } -- 2.51.2