diff options
| author | Jeff Carr <[email protected]> | 2025-02-21 16:35:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-21 16:35:21 -0600 |
| commit | f8dd6bca59bd66904eff05d1d33e117f816f46d9 (patch) | |
| tree | 4a7d897805ba571173e51029effb6198acca1018 /windowRepoProblems.go | |
| parent | ce938cc73bbd7849a4fd7de8e24e529fdb7dc8c9 (diff) | |
correctly cleans remote user branches finally!
Diffstat (limited to 'windowRepoProblems.go')
| -rw-r--r-- | windowRepoProblems.go | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/windowRepoProblems.go b/windowRepoProblems.go index b60125c..08e1f32 100644 --- a/windowRepoProblems.go +++ b/windowRepoProblems.go @@ -123,10 +123,21 @@ func makeRepoProblemsWindow() *repoProblemsWindow { found := remoteUserBranchProblem() group := box.NewGroup("test buttons") group.NewButton("git branch delete", func() { + win.Disable() + defer win.Enable() all := found.SortByFullPath() for all.Scan() { repo := all.Next() - log.Info("git branch -D jcarr", repo.GetGoPath()) + brname := repo.GetUserBranchName() + // git push origin --delete jcarr + cmd := []string{"git", "push", "origin", "--delete", brname} + log.Info(repo.GetGoPath(), cmd) + repo.RunVerbose(cmd) + + // git branch --delete --remote origin/jcarr + cmd = []string{"git", "branch", "--delete", "--remote", "origin/" + brname} + log.Info(repo.GetGoPath(), cmd) + repo.RunVerbose(cmd) } }) @@ -144,14 +155,14 @@ func makeRepoProblemsWindow() *repoProblemsWindow { txt = fmt.Sprintf("remote devel != local devel (%d)", found.Len()) grid.NewButton(txt, func() { found := develRemoteProblem() - makeStandardReposWindow(found) + makeStandardReposWindow(txt, found) }) found = masterRemoteProblem() txt = fmt.Sprintf("remote master != local master (%d)", found.Len()) grid.NewButton(txt, func() { found := masterRemoteProblem() - makeStandardReposWindow(found) + makeStandardReposWindow(txt, found) }) grid.NextRow() |
