summaryrefslogtreecommitdiff
path: root/checkout.go
diff options
context:
space:
mode:
Diffstat (limited to 'checkout.go')
-rw-r--r--checkout.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/checkout.go b/checkout.go
index 2180c22..ce8c88b 100644
--- a/checkout.go
+++ b/checkout.go
@@ -1,6 +1,7 @@
package gitpb
import (
+ "os"
"path/filepath"
"go.wit.com/log"
@@ -8,6 +9,20 @@ import (
func (repo *Repo) CheckoutMaster() bool {
bName := repo.GetMasterBranchName()
+ if bName == "giterr" {
+ cmd := []string{"git", "checkout", "main"} // todo: figure out main
+ repo.RunVerbose(cmd)
+ os.Exit(-1)
+ // TODO: try to fix this
+ if repo.checkoutBranch("main") {
+ repo.MasterBranchName = "main"
+ return true
+ } else {
+ cmd := []string{"git", "checkout", "main"} // todo: figure out main
+ repo.RunVerbose(cmd)
+ return false
+ }
+ }
if repo.checkoutBranch(bName) {
return true
}