From f271a27a6e27e2e04fe1e47f9d4c487d03940597 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 13 Oct 2025 05:11:27 -0500 Subject: more debugging for when you've lost your way --- checkout.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'checkout.go') 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") } -- cgit v1.2.3