summaryrefslogtreecommitdiff
path: root/gitTag.common.go
diff options
context:
space:
mode:
Diffstat (limited to 'gitTag.common.go')
-rw-r--r--gitTag.common.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitTag.common.go b/gitTag.common.go
index 0bbd70c..2f5c239 100644
--- a/gitTag.common.go
+++ b/gitTag.common.go
@@ -51,6 +51,17 @@ func (repo *Repo) GetRemoteHash(brname string) string {
return ""
}
+func (repo *Repo) GetRemoteTag(brname string) *GitTag {
+ refname := "refs/remotes/origin/" + brname
+ for tag := range repo.Tags.IterAll() {
+ // log.Info("repo tag", tag.GetHash(), tag.GetRefname())
+ if tag.GetRefname() == refname {
+ return tag
+ }
+ }
+ return nil
+}
+
// this is the correct way. uses 'git show-ref'
func (repo *Repo) IsBranchRemote(brname string) bool {
if repo.Tags == nil {