From 5ec788fe1766c1c70d30abfc1998a428d52459d4 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 21 Feb 2025 17:17:10 -0600 Subject: wrong logic --- gitTag.common.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gitTag.common.go b/gitTag.common.go index 81e44c3..c41f7c1 100644 --- a/gitTag.common.go +++ b/gitTag.common.go @@ -112,13 +112,12 @@ func (repo *Repo) IsLocalBranch(findname string) bool { loop := repo.Tags.All() for loop.Scan() { t := loop.Next() - // log.Info("LocalTagExists() tag:", t.Refname) - - tagname := t.Refname - if strings.HasPrefix(tagname, "refs/heads") { + if !strings.HasPrefix(t.Refname, "refs/heads") { + // log.Info("LocalTagExists() skip tag:", t.Refname) continue } - path, filename := filepath.Split(tagname) + // log.Info("LocalTagExists() check tag:", t.Refname) + path, filename := filepath.Split(t.Refname) log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) if filename == findname { log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) -- cgit v1.2.3