Merge branch 'bugfix/35645-git-stash-staged-files' of https://github.com/dKab/vscode into dKab-bugfix/35645-git-stash-staged-files

pull/40041/head
Joao Moreno 2017-12-11 17:38:59 +01:00
commit 484cae0399
1 changed files with 4 additions and 1 deletions

View File

@ -1472,7 +1472,10 @@ export class CommandCenter {
}
private async _stash(repository: Repository, includeUntracked = false): Promise<void> {
if (repository.workingTreeGroup.resourceStates.length === 0) {
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
if (noUnstagedChanges && noStagedChanges) {
window.showInformationMessage(localize('no changes stash', "There are no changes to stash."));
return;
}