diff options
| author | Jeff Carr <[email protected]> | 2025-10-10 08:57:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-10 08:57:20 -0500 |
| commit | 637dfccde510b19cfe6babd02b37bc2cc32e73ab (patch) | |
| tree | 26de8a80221022431ef6cf66d517ccb8c49b875c /gitTag.common.go | |
| parent | 83e294fdd9e9f88eb5a3f6711bd21d64c992c546 (diff) | |
default repos table
Diffstat (limited to 'gitTag.common.go')
| -rw-r--r-- | gitTag.common.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gitTag.common.go b/gitTag.common.go index 635ca7d..66e45e9 100644 --- a/gitTag.common.go +++ b/gitTag.common.go @@ -144,6 +144,22 @@ func (repo *Repo) IsLocalBranch(findname string) bool { return false } +func (repo *Repo) IsLocalBranchVerbose(findname string) bool { + for t := range repo.Tags.IterAll() { + if !strings.HasPrefix(t.Refname, "refs/heads") { + continue + } + path, filename := filepath.Split(t.Refname) + log.Info("gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) + if filename == findname { + log.Info("gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) + return true + } + } + log.Info("did not find tag:", findname, "in", repo.GetGoPath()) + return false +} + func (repo *Repo) IsRemoteBranch(findname string) bool { for t := range repo.Tags.IterAll() { if !strings.HasPrefix(t.Refname, "refs/remotes/origin") { |
