diff options
Diffstat (limited to 'checkout.go')
| -rw-r--r-- | checkout.go | 23 |
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 } |
