summaryrefslogtreecommitdiff
path: root/checkout.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-13 05:21:01 -0500
committerJeff Carr <[email protected]>2025-10-13 05:21:01 -0500
commit8e83f03be41ce28bbec2e40108932402792212e4 (patch)
treefa8405cb7d7b87c44d365b772694e41032264228 /checkout.go
parentf271a27a6e27e2e04fe1e47f9d4c487d03940597 (diff)
more attempts
Diffstat (limited to 'checkout.go')
-rw-r--r--checkout.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/checkout.go b/checkout.go
index 72d4d41..05c2b6a 100644
--- a/checkout.go
+++ b/checkout.go
@@ -149,15 +149,22 @@ func (repo *Repo) checkoutBranchError(bName string) error {
func (repo *Repo) checkoutBranchErrorUnsafe(brName string) error {
cmd := []string{"git", "checkout", brName}
- r := repo.Run(cmd)
- if r.Exit != 0 {
- log.Info("git checkout exit not zero", r.Exit)
- return errors.New("git checkout returned -1")
- }
- if r.Error != nil {
- log.Info("git checkout error:", r.Error)
- return r.Error
+ var err error
+ err = repo.RunVerbose(cmd)
+ if err != nil {
+ log.Info(repo.FullPath, "git checkout error", err)
+ return err
}
+ // if r.Error != nil {
+ // if r.Exit != 0 {
+ // log.Info(repo.Fullpath, "git checkout exit not zero", r.Exit)
+ // return errors.New("git checkout returned -1")
+ //}
+ // if r.Error != nil {
+ // log.Info(repo.FullPath, "git checkout error:", r.Error)
+ // return r.Error
+ // }
+ log.Info(repo.FullPath, "git checkout should have worked")
return nil
}