diff options
| author | Jeff Carr <[email protected]> | 2024-02-16 11:39:44 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-16 11:39:44 -0600 |
| commit | bdb761714361a3986834b8b50bb34cce45d01e4d (patch) | |
| tree | ab8f6df56abc48bcd15f4e5502ba2dc71d760161 /globalBuildOptions.go | |
| parent | e323b15eb7849649b5c9bd8b4a086ee665b86dbd (diff) | |
cleaning up repostatus code
Diffstat (limited to 'globalBuildOptions.go')
| -rw-r--r-- | globalBuildOptions.go | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/globalBuildOptions.go b/globalBuildOptions.go index 7602bc8..cc71e41 100644 --- a/globalBuildOptions.go +++ b/globalBuildOptions.go @@ -94,21 +94,31 @@ func globalBuildOptions(vbox *gui.Node) { // you can merge everything into the devel branch and make sure it actually // works. Then, when that is good, merge and version everything in master setBranchB = grid.NewButton("set current branch to:", func() { - log.Warn("set current branch to:", newBranch.String()) + targetName := newBranch.String() + log.Warn("set current branch to:", targetName) /* me.toMoveToBranch = guiBranch.String() setCurrentBranch.SetLabel("set all branches to " + me.toMoveToBranch) me.mainBranch.Disable() */ for _, repo := range me.allrepos { - if repo.status.CheckoutMaster() { - log.Warn("set master branch worked", repo.String) - repo.newScan() + if targetName == "jcarr" { + if repo.status.CheckoutUser() { + log.Warn("set master branch worked", repo.String()) + repo.newScan() + } else { + log.Warn("set master branch failed", repo.String()) + repo.newScan() + } } else { - log.Warn("set master branch failed", repo.String) - repo.newScan() + if repo.status.CheckoutMaster() { + log.Warn("set master branch worked", repo.String()) + repo.newScan() + } else { + log.Warn("set master branch failed", repo.String()) + repo.newScan() + } } - // return } }) newBranch = grid.NewCombobox() |
