Git - add open stash command (#201970)

* Initial implementation

* Add button to quick pick

* Improve stash picker

* Remove quick pick buttons
This commit is contained in:
Ladislau Szomoru
2024-01-08 09:48:51 +01:00
committed by GitHub
parent 0a90cb8a06
commit cfebdd863a
5 changed files with 96 additions and 11 deletions

View File

@@ -1931,7 +1931,7 @@ export class Repository implements Disposable {
}
async getStashes(): Promise<Stash[]> {
return await this.repository.getStashes();
return this.run(Operation.Stash, () => this.repository.getStashes());
}
async createStash(message?: string, includeUntracked?: boolean, staged?: boolean): Promise<void> {
@@ -1958,6 +1958,10 @@ export class Repository implements Disposable {
return await this.run(Operation.Stash, () => this.repository.applyStash(index));
}
async showStash(index: number): Promise<string[] | undefined> {
return await this.run(Operation.Stash, () => this.repository.showStash(index));
}
async getCommitTemplate(): Promise<string> {
return await this.run(Operation.GetCommitTemplate, async () => this.repository.getCommitTemplate());
}