diff options
Diffstat (limited to 'gitTag.common.go')
| -rw-r--r-- | gitTag.common.go | 21 |
1 files changed, 19 insertions, 2 deletions
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 } |
