work on using repo.Reload() more smarter

This commit is contained in:
Jeff Carr 2025-09-13 00:51:22 -05:00
parent b5df8f2dad
commit 405ddb6994
3 changed files with 4 additions and 8 deletions

View File

@ -20,15 +20,11 @@ func checkRemoteBranches(repo *gitpb.Repo) error {
}
if repo.VerifyRemoteAndLocalBranches(repo.GetDevelBranchName()) {
} else {
repo.Reload()
me.forge.SetConfigSave(true)
return log.Errorf("remote devel is out of sync with local")
return log.Errorf("remote devel is out of sync with local: todo: git pull or git fetch")
}
if repo.VerifyRemoteAndLocalBranches(repo.GetMasterBranchName()) {
} else {
repo.Reload()
me.forge.SetConfigSave(true)
return log.Errorf("remote master is out of sync with local")
return log.Errorf("remote master is out of sync with local: todo: git pull or git fetch")
}
return nil
}

View File

@ -70,7 +70,7 @@ func checkNormalRepoState(repo *gitpb.Repo) error {
configSave = true
log.Info("changing to user branch", repo.FullPath)
repo.CheckoutUser()
repo.Reload()
repo.ReloadCheck()
return log.Errorf("now on user branch")
}
return nil

View File

@ -99,7 +99,7 @@ func makeReposWin() *stdReposTableWin {
cmd = []string{"git", "branch", "--delete", "--remote", "origin/" + brname}
log.Info(repo.GetGoPath(), cmd)
repo.RunVerbose(cmd)
repo.Reload()
repo.ReloadCheck()
}
me.forge.SetConfigSave(true)
me.forge.ConfigSave()