Skip to content

Commit b4b87ff

Browse files
authored
Git - show notification when there are no staged changes/changes/untracked changes (microsoft#211170)
1 parent 0991b00 commit b4b87ff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

extensions/git/src/commands.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,6 +4160,17 @@ export class CommandCenter {
41604160

41614161
private async _viewResourceGroupChanges(repository: Repository, resourceGroup: GitResourceGroup): Promise<void> {
41624162
if (resourceGroup.resourceStates.length === 0) {
4163+
switch (resourceGroup.id) {
4164+
case 'index':
4165+
window.showInformationMessage(l10n.t('The repository does not have any staged changes.'));
4166+
break;
4167+
case 'workingTree':
4168+
window.showInformationMessage(l10n.t('The repository does not have any changes.'));
4169+
break;
4170+
case 'untracked':
4171+
window.showInformationMessage(l10n.t('The repository does not have any untracked changes.'));
4172+
break;
4173+
}
41634174
return;
41644175
}
41654176

0 commit comments

Comments
 (0)