@@ -348,7 +348,7 @@ export class StashGitCommand extends QuickCommand<State> {
348348 try {
349349 await state . repo . git . stash ( ) ?. applyStash (
350350 // pop can only take a stash index, e.g. `stash@{1}`
351- state . subcommand === 'pop' ? `stash@{${ state . reference . number } }` : state . reference . ref ,
351+ state . subcommand === 'pop' ? `stash@{${ state . reference . stashNumber } }` : state . reference . ref ,
352352 { deleteAfter : state . subcommand === 'pop' } ,
353353 ) ;
354354
@@ -449,16 +449,16 @@ export class StashGitCommand extends QuickCommand<State> {
449449
450450 endSteps ( state ) ;
451451
452- state . references . sort ( ( a , b ) => parseInt ( b . number , 10 ) - parseInt ( a . number , 10 ) ) ;
452+ state . references . sort ( ( a , b ) => parseInt ( b . stashNumber , 10 ) - parseInt ( a . stashNumber , 10 ) ) ;
453453 for ( const ref of state . references ) {
454454 try {
455455 // drop can only take a stash index, e.g. `stash@{1}`
456- await state . repo . git . stash ( ) ?. deleteStash ( `stash@{${ ref . number } }` , ref . ref ) ;
456+ await state . repo . git . stash ( ) ?. deleteStash ( `stash@{${ ref . stashNumber } }` , ref . ref ) ;
457457 } catch ( ex ) {
458458 Logger . error ( ex , context . title ) ;
459459
460460 void showGenericErrorMessage (
461- `Unable to delete stash@{${ ref . number } }${ ref . message ? `: ${ ref . message } ` : '' } ` ,
461+ `Unable to delete stash@{${ ref . stashNumber } }${ ref . message ? `: ${ ref . message } ` : '' } ` ,
462462 ) ;
463463 }
464464 }
0 commit comments