File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -498,10 +498,11 @@ func ApplyPlan(
498498 // Check out the best branch — the original if it's still in the stack,
499499 // otherwise the nearest surviving branch.
500500 targetBranch := resolveCheckoutBranch (currentBranch , plan , snapshot , s )
501- _ = git .CheckoutBranch (targetBranch )
501+ if err : = git .CheckoutBranch (targetBranch ); err == nil {
502502 if targetBranch != currentBranch {
503503 cfg .Printf ("Switched to %s (original branch %s is no longer in the stack)" , targetBranch , currentBranch )
504504 }
505+ }
505506
506507 // Update base SHAs
507508 updateBaseSHAs (s )
@@ -762,9 +763,10 @@ func ContinueApply(
762763 // All rebases done — check out the best branch
763764 if state .OriginalBranch != "" {
764765 targetBranch := resolveCheckoutBranch (state .OriginalBranch , state .Plan , state .Snapshot , s )
765- _ = git .CheckoutBranch (targetBranch )
766+ if err : = git .CheckoutBranch (targetBranch ); err == nil {
766767 if targetBranch != state .OriginalBranch {
767768 cfg .Printf ("Switched to %s (original branch %s is no longer in the stack)" , targetBranch , state .OriginalBranch )
769+ }
768770 }
769771 }
770772
You can’t perform that action at this time.
0 commit comments