diff options
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") { |
