summaryrefslogtreecommitdiff
path: root/doNormal.go
diff options
context:
space:
mode:
Diffstat (limited to 'doNormal.go')
-rw-r--r--doNormal.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/doNormal.go b/doNormal.go
index 33cbcf6..06fec11 100644
--- a/doNormal.go
+++ b/doNormal.go
@@ -17,6 +17,7 @@ import (
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
+ "google.golang.org/protobuf/proto"
)
func doNormal() bool {
@@ -130,6 +131,16 @@ func checkNormalRepoState(repo *gitpb.Repo) error {
return ErrorLocalMasterBranch
}
+ if repo.Tags.Master == nil {
+ if found := repo.GetRemoteTag(repo.GetMasterBranchName()); found != nil {
+ log.Info("found master tag ", repo.FullPath, found)
+ repo.Tags.Master = proto.Clone(found).(*gitpb.GitTag)
+ config.SetChanged("repos", true)
+ } else {
+ log.Info("not found master tag", repo.FullPath)
+ }
+ }
+
if repo.GetCurrentBranchName() != repo.GetUserBranchName() {
log.Infof("changing to user(%s) branch: %s\n", repo.GetUserBranchName(), repo.FullPath)
repo.CheckoutUser()