better output with 'forge normal'

This commit is contained in:
Jeff Carr 2025-08-31 13:27:39 -05:00
parent c4252d2103
commit 731a4d9da8
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,7 @@ func checkNormalRepoState(repo *gitpb.Repo) error {
if repo.GetMasterBranchName() == "" {
me.forge.VerifyBranchNames(repo)
configSave = true
log.Info("ABNORMAL: master branch name was blank in", repo.GetFullPath())
// log.Info("ABNORMAL: master branch name was blank in", repo.GetFullPath())
}
if repo.GetMasterBranchName() == "" {
return log.Errorf("master branch name blank")
@ -45,6 +45,7 @@ func checkNormalRepoState(repo *gitpb.Repo) error {
return err
}
if repo.GetCurrentBranchName() != repo.GetUserBranchName() {
configSave = true
if err := repo.CheckoutUser(); err != nil {
return err
}

View File

@ -130,7 +130,10 @@ func main() {
}
if argv.Normal != nil {
doNormal()
if doNormal() {
log.Infof("all %d repos are on your user branch. It is safe to write code now.\n", me.forge.Repos.Len())
okExit("")
}
okExit("")
}