diff options
| author | Jeff Carr <[email protected]> | 2025-09-23 19:53:55 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-23 19:53:55 -0500 |
| commit | 9aa0c188b0b3fc86d396e3421385356462594d42 (patch) | |
| tree | 991cc2d1317caccf458241926020ef64f47a8a18 /reload.go | |
| parent | 843d9fbb8d31b2735621d02631924155615d97f6 (diff) | |
try to fix out of sync local branchesv0.0.134
Diffstat (limited to 'reload.go')
| -rw-r--r-- | reload.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,10 +1,12 @@ 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" ) @@ -93,6 +95,11 @@ 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 } |
