From f4838d750004b951c6e2f3affab44560a2827b19 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 25 Sep 2025 15:45:32 -0500 Subject: add 'fix' flag --- doNormal.go | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'doNormal.go') diff --git a/doNormal.go b/doNormal.go index 1f4b53e..9838d25 100644 --- a/doNormal.go +++ b/doNormal.go @@ -15,7 +15,6 @@ import ( "go.wit.com/lib/config" "go.wit.com/lib/fhelp" "go.wit.com/lib/gui/shell" - "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -35,7 +34,7 @@ func doNormal() bool { } repo := me.forge.Repos.FindByFullPath(path) if stat.Err == ErrorLocalDevelBranch { - if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL { + if argv.Normal.Fix != nil { bname := repo.GetDevelBranchName() s := fmt.Sprintf("repair the %s branch on %s", bname, repo.FullPath) if fhelp.QuestionUser(s) { @@ -46,7 +45,7 @@ func doNormal() bool { } } if stat.Err == ErrorLocalMasterBranch { - if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL { + if argv.Normal.Fix != nil { bname := repo.GetMasterBranchName() s := fmt.Sprintf("repair the %s branch on %s", bname, repo.FullPath) if fhelp.QuestionUser(s) { @@ -125,25 +124,9 @@ func checkNormalRepoState(repo *gitpb.Repo) error { if !repo.VerifyRemoteAndLocalBranches(repo.GetDevelBranchName()) { return ErrorLocalDevelBranch - /* - bname := repo.GetDevelBranchName() - s := fmt.Sprintf("repair the %s branch on %s", bname, repo.FullPath) - if fhelp.QuestionUser(s) { - repo.RunVerbose([]string{"git", "branch", "-D", bname}) - repo.RunVerbose([]string{"git", "checkout", bname}) - } - */ } if !repo.VerifyRemoteAndLocalBranches(repo.GetMasterBranchName()) { return ErrorLocalMasterBranch - /* - bname := repo.GetMasterBranchName() - s := fmt.Sprintf("repair the %s branch on %s", bname, repo.FullPath) - if fhelp.QuestionUser(s) { - repo.RunVerbose([]string{"git", "branch", "-D", bname}) - repo.RunVerbose([]string{"git", "checkout", bname}) - } - */ } if repo.GetCurrentBranchName() != repo.GetUserBranchName() { -- cgit v1.2.3