summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-13 05:11:27 -0500
committerJeff Carr <[email protected]>2025-10-13 05:11:27 -0500
commitf271a27a6e27e2e04fe1e47f9d4c487d03940597 (patch)
tree60714bf6fb7e6a7359bd8a1e27f357064df1aac7
parent9a13caa69b827ff3218d8295fa8e3dd66c98d61a (diff)
more debugging for when you've lost your way
-rw-r--r--checkout.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/checkout.go b/checkout.go
index 491644e..72d4d41 100644
--- a/checkout.go
+++ b/checkout.go
@@ -26,30 +26,39 @@ func (repo *Repo) CheckoutMasterError() error {
func (r *Repo) CheckoutForce() error {
brName := r.GetDevelBranchName()
if r.IsLocalBranch(brName) {
+ log.Info(r.FullPath, "Checking out local devel")
if err := r.checkoutBranchErrorUnsafe(brName); err == nil {
return nil
}
}
if r.IsRemoteBranch(brName) {
+ log.Info(r.FullPath, "There is a remote devel branch")
// ya, it could run this twice. whatever
if err := r.checkoutBranchErrorUnsafe(brName); err == nil {
return nil
}
+ } else {
+ log.Info(r.FullPath, "There is not a remote devel branch", brName)
}
brName = r.GetMasterBranchName()
if r.IsLocalBranch(brName) {
+ log.Info(r.FullPath, "Checking out local master")
if err := r.checkoutBranchErrorUnsafe(brName); err == nil {
return nil
}
}
if r.IsRemoteBranch(brName) {
+ log.Info(r.FullPath, "Checking out remote master")
// things are jacked
if err := r.checkoutBranchErrorUnsafe(brName); err == nil {
return nil
} else {
return err
}
+ } else {
+ log.Info(r.FullPath, "There is not a remote master branch", brName)
}
+ log.Info(r.FullPath, "forge doesn't know how to handle this yet")
return errors.New("no working devel or master branches todo: find one here")
}