Adds 'Show Stashed Changes` command

Adds experimental 'Apply Stashed Changes' command
Adds experimental 'Delete Stashed Changes' to stashed changes quick pick
This commit is contained in:
Eric Amodio
2017-03-28 18:43:33 -04:00
parent 19fe22f061
commit 9945ee6d94
21 changed files with 566 additions and 137 deletions

View File

@@ -34,7 +34,7 @@ export interface IGitCommitLine {
code?: string;
}
export type GitCommitType = 'blame' | 'file' | 'repo';
export type GitCommitType = 'blame' | 'file' | 'repo' | 'stash';
export class GitCommit implements IGitCommit {

View File

@@ -5,4 +5,6 @@ export * from './commit';
export * from './log';
export * from './logCommit';
export * from './remote';
export * from './stash';
export * from './stashCommit';
export * from './status';

7
src/git/models/stash.ts Normal file
View File

@@ -0,0 +1,7 @@
'use strict';
import { GitStashCommit } from './stashCommit';
export interface IGitStash {
repoPath: string;
commits: Map<string, GitStashCommit>;
}

View File

@@ -0,0 +1,24 @@
'use strict';
import { IGitCommitLine } from './commit';
import { GitLogCommit } from './logCommit';
import { IGitStatusFile, GitStatusFileStatus } from './status';
export class GitStashCommit extends GitLogCommit {
constructor(
public stashName: string,
repoPath: string,
sha: string,
fileName: string,
date: Date,
message: string,
status?: GitStatusFileStatus,
fileStatuses?: IGitStatusFile[],
lines?: IGitCommitLine[],
originalFileName?: string,
previousSha?: string,
previousFileName?: string
) {
super('stash', repoPath, sha, fileName, undefined, date, message, status, fileStatuses, lines, originalFileName, previousSha, previousFileName);
}
}