From 3718ebe168dc7c4ce553bdc9b4e19b4b7bfe0d33 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 26 Sep 2025 23:44:19 -0500 Subject: add Tags.Master & Tags.Devel --- gitTag.common.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gitTag.common.go') diff --git a/gitTag.common.go b/gitTag.common.go index 0bbd70c..2f5c239 100644 --- a/gitTag.common.go +++ b/gitTag.common.go @@ -51,6 +51,17 @@ func (repo *Repo) GetRemoteHash(brname string) string { return "" } +func (repo *Repo) GetRemoteTag(brname string) *GitTag { + refname := "refs/remotes/origin/" + brname + for tag := range repo.Tags.IterAll() { + // log.Info("repo tag", tag.GetHash(), tag.GetRefname()) + if tag.GetRefname() == refname { + return tag + } + } + return nil +} + // this is the correct way. uses 'git show-ref' func (repo *Repo) IsBranchRemote(brname string) bool { if repo.Tags == nil { -- cgit v1.2.3