mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Close stale diff editors while stashing changes
This commit is contained in:
@@ -1636,7 +1636,15 @@ export class Repository implements Disposable {
|
||||
}
|
||||
|
||||
async createStash(message?: string, includeUntracked?: boolean): Promise<void> {
|
||||
return await this.run(Operation.Stash, () => this.repository.createStash(message, includeUntracked));
|
||||
const indexResources = [...this.indexGroup.resourceStates.map(r => r.resourceUri.fsPath)];
|
||||
const workingGroupResources = [
|
||||
...this.workingTreeGroup.resourceStates.map(r => r.resourceUri.fsPath),
|
||||
...includeUntracked ? this.untrackedGroup.resourceStates.map(r => r.resourceUri.fsPath) : []];
|
||||
|
||||
return await this.run(Operation.Stash, async () => {
|
||||
this.repository.createStash(message, includeUntracked);
|
||||
this.closeDiffEditors(indexResources, workingGroupResources);
|
||||
});
|
||||
}
|
||||
|
||||
async popStash(index?: number): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user