Defaults stashes format to ${filePath}

Adds message when there are no stashes
Cleans up the stash explorer
This commit is contained in:
Eric Amodio
2017-08-27 04:15:21 -04:00
parent bcd83566a1
commit ef41176ea7
6 changed files with 30 additions and 36 deletions

View File

@@ -14,9 +14,9 @@ export class StashNode extends ExplorerNode {
super(uri);
}
async getChildren(): Promise<StashCommitNode[]> {
async getChildren(): Promise<ExplorerNode[]> {
const stash = await this.git.getStashList(this.uri.repoPath!);
if (stash === undefined) return [];
if (stash === undefined) return [new TextExplorerNode('No stashed changes')];
return [...Iterables.map(stash.commits.values(), c => new StashCommitNode(c, this.context, this.git))];
}