Skip to content

Commit f4f3fc9

Browse files
skarimLukeghenco
andauthored
Apply suggestions from code review
Co-authored-by: Luke Ghenco <lukeghenco@github.com> Co-authored-by: Sameen Karim <skarim@github.com>
1 parent c1a8cbe commit f4f3fc9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/modify.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ func runModifyAbort(cfg *config.Config) error {
201201
cfg.Printf("Restoring stack to pre-modify state...")
202202
if err := modify.UnwindFromStateFile(cfg, gitDir); err != nil {
203203
cfg.Errorf("recovery failed: %s", err)
204+
cfg.Printf("The stack may be in an inconsistent state.")
205+
cfg.Printf("Try `%s` to fix, or `%s` + `%s` to recreate.",
206+
cfg.ColorCyan("gh stack rebase"), cfg.ColorCyan("gh stack unstack --local"),
207+
cfg.ColorCyan("gh stack init --adopt"))
204208
return ErrSilent
205209
}
206210
cfg.Successf("Stack restored successfully")

cmd/submit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func runSubmit(cfg *config.Config, opts *submitOptions) error {
129129
return nil
130130
}
131131

132-
// If a modify is pending, delete the old remote stack first so that
132+
// If a modification is pending, delete the old remote stack first so that
133133
// PR base updates are allowed and force-pushes don't trigger auto-merges.
134134
if stacksAvailable {
135135
if err := handlePendingModify(cfg, client, s, gitDir); err != nil {

0 commit comments

Comments
 (0)