diff options
| author | Jeff Carr <[email protected]> | 2025-09-26 23:43:29 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-26 23:43:29 -0500 |
| commit | 9eabff46459a912b09aa7937199134b01d09def0 (patch) | |
| tree | 869c7d3b2b427d69c5230009f4f1b695930945fe /doNormal.go | |
| parent | 54a4c94ec3b140ff6156e8ec324ec3b1df15955d (diff) | |
save Tags.Master & Tags.Devel
Diffstat (limited to 'doNormal.go')
| -rw-r--r-- | doNormal.go | 11 |
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() |
