From 3ab156a9c477f4d839e1384d424856519390b797 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 21 Feb 2025 09:33:58 -0600 Subject: [PATCH] gitpb code is changing --- windowBranches.go | 74 ++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/windowBranches.go b/windowBranches.go index 3aba4e8..b641ac6 100644 --- a/windowBranches.go +++ b/windowBranches.go @@ -81,45 +81,47 @@ func MakeRepoBranchesWindow(repo *gitpb.Repo) *repoBranchesWindow { grid.NewGroup("Hash") grid.NextRow() - for _, b := range repo.GetLocalBranches() { - hash := repo.GetBranchHash(b) - grid.NewLabel(b) - grid.NewLabel(repo.GetBranchVersion(b)) - if s, err := repo.GetHashName(hash); err == nil { - grid.NewLabel(s) - } else { - grid.NewLabel("err") - } - grid.NewLabel("local") + /* + for _, b := range repo.GetLocalBranches() { + hash := repo.GetBranchHash(b) + grid.NewLabel(b) + grid.NewLabel(repo.GetBranchVersion(b)) + if s, err := repo.GetHashName(hash); err == nil { + grid.NewLabel(s) + } else { + grid.NewLabel("err") + } + grid.NewLabel("local") - grid.NewLabel(hash) - grid.NewButton("Delete", func() { - repo.RunVerbose([]string{"git", "branch", "-D", b}) - }) - grid.NextRow() - } - - for _, b := range repo.GetRemoteBranches() { - hash := repo.GetBranchHash(b) - grid.NewLabel(b) - forgeuse := repo.GetBranchVersion(b) - grid.NewLabel(forgeuse) - if s, err := repo.GetHashName(hash); err == nil { - grid.NewLabel(s) - } else { - grid.NewLabel("") - } - grid.NewLabel("remote") - - grid.NewLabel(hash) - if b == "origin/HEAD" || forgeuse == "remote master" { - // can't delete these - } else { - grid.NewButton("Delete Remote", func() { + grid.NewLabel(hash) + grid.NewButton("Delete", func() { + repo.RunVerbose([]string{"git", "branch", "-D", b}) }) + grid.NextRow() } - grid.NextRow() - } + + for _, b := range repo.GetRemoteBranches() { + hash := repo.GetBranchHash(b) + grid.NewLabel(b) + forgeuse := repo.GetBranchVersion(b) + grid.NewLabel(forgeuse) + if s, err := repo.GetHashName(hash); err == nil { + grid.NewLabel(s) + } else { + grid.NewLabel("") + } + grid.NewLabel("remote") + + grid.NewLabel(hash) + if b == "origin/HEAD" || forgeuse == "remote master" { + // can't delete these + } else { + grid.NewButton("Delete Remote", func() { + }) + } + grid.NextRow() + } + */ return pw }