From 7360716b35b452595e93c554d5f342b9f0338ea2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 5 Oct 2025 17:25:40 -0500 Subject: rm old code --- reloadRepoState.go | 56 ------------------------------------------------------ 1 file changed, 56 deletions(-) (limited to 'reloadRepoState.go') diff --git a/reloadRepoState.go b/reloadRepoState.go index be1e612..37f24a3 100644 --- a/reloadRepoState.go +++ b/reloadRepoState.go @@ -2,62 +2,6 @@ package gitpb // does processing on the go.mod and go.sum files -/* -// this is old crap that can finally be deprecated now that everything is protobuf -func (repo *Repo) setRepoState() { - if repo == nil { - return - } - if repo.IsDirty() { - repo.State = "dirty" - return - } - if repo.GetUserVersion() == "" { - // user has not set user branch name - } else { - if repo.GetUserVersion() != repo.GetDevelVersion() { - repo.State = "merge to devel" - return - } - } - if repo.GetDevelVersion() != repo.GetMasterVersion() { - if !repo.IsLocalBranch(repo.GetDevelBranchName()) { - // the remote devel branch exists but is not checked out - repo.State = "no devel branch" - return - } - b1, err := repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName()) - if err != nil { - repo.State = "git log err" - } - if b1 == 0 { - repo.State = "merge to main" - // log.Info("master vs devel count is normal b1 == 0", b1) - } else { - repo.State = log.Sprintf("DEVEL < MASTER by %d", b1) - // log.Info("master vs devel count b1 != 0", b1) - log.Infof("%s devel branch is behind master branch (missing %d commits)\n", repo.GetGoPath(), b1) - } - return - } - // if IsGoTagVersionGreater(oldtag string, newtag string) bool { - if !IsGoTagVersionGreater(repo.GetLastTag(), repo.GetMasterVersion()) { - repo.State = "last tag greater error" - return - } - if repo.GetLastTag() != repo.GetMasterVersion() { - repo.State = "ready to release" - return - } - - if b := repo.CheckBranches(); b != "" { - repo.State = "unknown branch " + b - return - } - repo.State = "PERFECT" -} -*/ - // returns true if old="v0.2.4" and new="v0.3.3" // returns true if equal // todo: make all of this smarter someday -- cgit v1.2.3