From c9149bbb13654d76518365d199dc0d51d6f5cfaf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 15 Feb 2025 17:07:49 -0600 Subject: keep switching over to the protobuf --- gitTag.common.go | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'gitTag.common.go') diff --git a/gitTag.common.go b/gitTag.common.go index a4c7696..d349dea 100644 --- a/gitTag.common.go +++ b/gitTag.common.go @@ -21,6 +21,23 @@ func (repo *Repo) DevelHash() string { return "" } +// this is the correct way. uses 'git show-ref' +func (repo *Repo) IsBranchRemote(brname string) bool { + if repo.Tags == nil { + return false + } + + brname = "refs/remotes/origin/" + brname + ref := repo.Tags.FindByRefname(brname) + if ref == nil { + // log.Info("did not found refname!!!!!!!!", brname) + return false + } + // log.Info("found refname!!!!!!!!") + return true +} + +// this is the correct way. uses 'git show-ref' func (repo *Repo) IsDevelRemote() bool { if repo.Tags == nil { return false @@ -30,10 +47,10 @@ func (repo *Repo) IsDevelRemote() bool { refname := "refs/remotes/origin/" + devname ref := repo.Tags.FindByRefname(refname) if ref == nil { - log.Info("did not found refname!!!!!!!!", refname) + // log.Info("did not found refname!!!!!!!!", refname) return false } - log.Info("found refname!!!!!!!!") + // log.Info("found refname!!!!!!!!") return true } -- cgit v1.2.3