diff options
Diffstat (limited to 'reload.go')
| -rw-r--r-- | reload.go | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -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 } |
