@@ -13,8 +13,8 @@ import (
1313)
1414
1515type modifyOptions struct {
16- recover bool
17- cont bool
16+ abort bool
17+ cont bool
1818}
1919
2020func ModifyCmd (cfg * config.Config ) * cobra.Command {
@@ -34,8 +34,8 @@ Operations available:
3434All changes are staged in the TUI and applied together when you press Ctrl+S.
3535After applying, run 'gh stack submit' to push changes and recreate the stack on GitHub.` ,
3636 RunE : func (cmd * cobra.Command , args []string ) error {
37- if opts .recover {
38- return runModifyRecover (cfg )
37+ if opts .abort {
38+ return runModifyAbort (cfg )
3939 }
4040 if opts .cont {
4141 return runModifyContinue (cfg )
@@ -44,7 +44,7 @@ After applying, run 'gh stack submit' to push changes and recreate the stack on
4444 },
4545 }
4646
47- cmd .Flags ().BoolVar (& opts .recover , "recover " , false , "Recover from a crashed modify session " )
47+ cmd .Flags ().BoolVar (& opts .abort , "abort " , false , "Abort the modify session and restore the stack to its pre- modify state " )
4848 cmd .Flags ().BoolVar (& opts .cont , "continue" , false , "Continue after resolving conflicts" )
4949
5050 return cmd
@@ -125,7 +125,7 @@ func runModify(cfg *config.Config) error {
125125 cfg .Printf ("" )
126126
127127 cfg .Printf ("Or restore the stack to its pre-modify state with `%s`" ,
128- cfg .ColorCyan ("gh stack modify --recover " ))
128+ cfg .ColorCyan ("gh stack modify --abort " ))
129129 return ErrConflict
130130 }
131131
@@ -170,8 +170,8 @@ func printModifySuccess(cfg *config.Config, result *modifyview.ApplyResult, hasR
170170 }
171171}
172172
173- // runModifyRecover handles recovery from a crashed modify session .
174- func runModifyRecover (cfg * config.Config ) error {
173+ // runModifyAbort handles recovery to a pre- modify state .
174+ func runModifyAbort (cfg * config.Config ) error {
175175 gitDir , err := git .GitDir ()
176176 if err != nil {
177177 cfg .Errorf ("not a git repository" )
@@ -185,7 +185,7 @@ func runModifyRecover(cfg *config.Config) error {
185185 }
186186
187187 if state == nil {
188- cfg .Printf ("No modify session to recover " )
188+ cfg .Printf ("No modify session to abort " )
189189 return nil
190190 }
191191
@@ -301,13 +301,13 @@ func checkNoModifyInProgress(cfg *config.Config, gitDir string) error {
301301 case "applying" :
302302 cfg .Errorf ("a previous modify session was interrupted" )
303303 cfg .Printf ("Run `%s` to restore your stack" ,
304- cfg .ColorCyan ("gh stack modify --recover " ))
304+ cfg .ColorCyan ("gh stack modify --abort " ))
305305 return ErrModifyRecovery
306306 case "conflict" :
307307 cfg .Errorf ("a modify has unresolved conflicts" )
308308 cfg .Printf ("Run `%s` to continue, or `%s` to restore your stack" ,
309309 cfg .ColorCyan ("gh stack modify --continue" ),
310- cfg .ColorCyan ("gh stack modify --recover " ))
310+ cfg .ColorCyan ("gh stack modify --abort " ))
311311 return ErrSilent
312312 case "pending_submit" :
313313 cfg .Errorf ("a modify was completed but the stack has not been submitted yet" )
0 commit comments