File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
14
14
15
15
- Fixes unstaging files doesn't work in the Inspect/Details views ([ #4485 ] ( https://github.com/gitkraken/vscode-gitlens/issues/4485 ) )
16
16
- Fixes error when stashing only staged changes ([ #4490 ] ( https://github.com/gitkraken/vscode-gitlens/issues/4490 ) )
17
+ - Fixes AI stash message generation when all changes are staged
17
18
18
19
## [ 17.3.0] - 2025-07-08
19
20
Original file line number Diff line number Diff line change @@ -642,11 +642,21 @@ export class StashGitCommand extends QuickCommand<State> {
642
642
using resume = step . freeze ?.( ) ;
643
643
644
644
try {
645
- const diff = await state . repo . git . diff . getDiff ?.(
645
+ let diff = await state . repo . git . diff . getDiff ?.(
646
646
state . flags . includes ( '--staged' ) ? uncommittedStaged : uncommitted ,
647
647
undefined ,
648
648
state . uris ?. length ? { uris : state . uris } : undefined ,
649
649
) ;
650
+
651
+ // If we didn't find a diff, check if everything is staged (e.g. diff to uncommittedStaged)
652
+ if ( ! diff ?. contents && ! state . flags . includes ( '--staged' ) ) {
653
+ diff = await state . repo . git . diff . getDiff ?.(
654
+ uncommittedStaged ,
655
+ undefined ,
656
+ state . uris ?. length ? { uris : state . uris } : undefined ,
657
+ ) ;
658
+ }
659
+
650
660
if ( ! diff ?. contents ) {
651
661
void window . showInformationMessage ( 'No changes to generate a stash message from.' ) ;
652
662
return ;
You can’t perform that action at this time.
0 commit comments