From 007bf0df9c76a4f91781b97e02ec16184416f9f8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 13 Feb 2025 23:38:22 -0600 Subject: [PATCH] check branch differences --- doGui.go | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/doGui.go b/doGui.go index cb54cb8..6c2a2df 100644 --- a/doGui.go +++ b/doGui.go @@ -251,15 +251,30 @@ func findMergeToMaster() { all := me.forge.Repos.SortByFullPath() for all.Scan() { repo := all.Next() - if repo.IsDirty() { - continue - } if me.forge.Config.IsReadOnly(repo.GetGoPath()) { continue } - if repo.GetMasterVersion() != repo.GetDevelVersion() { + /* + if repo.IsDirty() { + continue + } + if repo.GetMasterVersion() != repo.GetDevelVersion() { + me.found.AppendByGoPath(repo) + continue + } + */ + + // this sees if devel is behind master. IT SHOULD NOT BE + if repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName()) == 0 { + // everything is normal + } else { + repo.State = "DEVEL < MASTER" + log.Info("SERIOUS ERROR. DEVEL BRANCH IS BEHIND MASTER", repo.GetGoPath()) + } + + // this sees if devel has patches for master. If it does, add it to me.found + if repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName()) > 0 { me.found.AppendByGoPath(repo) - continue } } now := time.Now()