check branch differences

This commit is contained in:
Jeff Carr 2025-02-13 23:38:22 -06:00
parent 116dafc662
commit 007bf0df9c
1 changed files with 20 additions and 5 deletions

View File

@ -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()