From da5a97e3a8dfe4e4bb9ab08df54ffa7adeb2a79b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 25 Sep 2025 05:05:19 -0500 Subject: no reason to call these in Reload() --- reload.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'reload.go') diff --git a/reload.go b/reload.go index 0016295..f1ef298 100644 --- a/reload.go +++ b/reload.go @@ -1,12 +1,10 @@ package gitpb import ( - "fmt" "strings" "time" "go.wit.com/lib/config" - "go.wit.com/lib/fhelp" "go.wit.com/log" timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) @@ -75,8 +73,8 @@ func (repo *Repo) ReloadForce() error { } } - repo.VerifyRemoteAndLocalBranches(repo.GetDevelBranchName()) - repo.VerifyRemoteAndLocalBranches(repo.GetMasterBranchName()) + // repo.VerifyRemoteAndLocalBranches(repo.GetDevelBranchName()) + // repo.VerifyRemoteAndLocalBranches(repo.GetMasterBranchName()) // LastUpdate should always be the newest time repo.Times.LastUpdate = timestamppb.New(time.Now()) @@ -84,6 +82,7 @@ func (repo *Repo) ReloadForce() error { return nil } +// used in "normal" mode check func (repo *Repo) VerifyRemoteAndLocalBranches(bname string) bool { if !repo.IsBranchRemote(bname) { return true @@ -95,11 +94,6 @@ func (repo *Repo) VerifyRemoteAndLocalBranches(bname string) bool { return true } else { log.Info(lh, rh, "local != remote", repo.FullPath, bname) - s := fmt.Sprintf("repair the %s branch", bname) - if fhelp.QuestionUser(s) { - repo.RunVerbose([]string{"git", "branch", "-D", bname}) - repo.RunVerbose([]string{"git", "checkout", bname}) - } } return false } -- cgit v1.2.3