summaryrefslogtreecommitdiff
path: root/checkout.go
diff options
context:
space:
mode:
Diffstat (limited to 'checkout.go')
-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")
}