From b76c20d78d97d0e8d81e51ab3084f9d364587bc5 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 5 Oct 2025 13:24:46 -0500 Subject: general check for anything that matches --- gitTag.common.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gitTag.common.go b/gitTag.common.go index 20fe31a..5292b01 100644 --- a/gitTag.common.go +++ b/gitTag.common.go @@ -156,6 +156,15 @@ func (repo *Repo) IsRemoteBranch(findname string) bool { return false } +func (repo *Repo) IfRefExists(refname string) bool { + for t := range repo.Tags.IterAll() { + if _, filename := filepath.Split(t.Refname); filename == refname { + return true + } + } + return false +} + // finds the newest tag. used for deciding if master needs to be published func (repo *Repo) FindLastTag() string { var newest *GitTag -- cgit v1.2.3