mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
Git - Optimistic UI updates for rebase continue (#165699)
Optimistic UI updates for rebase continue
This commit is contained in:
@@ -1265,7 +1265,8 @@ export class Repository implements Disposable {
|
||||
|
||||
await this.repository.rebaseContinue();
|
||||
await this.commitOperationCleanup(message, opts);
|
||||
});
|
||||
},
|
||||
() => this.commitOperationGetOptimisticResourceGroups(opts));
|
||||
} else {
|
||||
// Set post-commit command to render the correct action button
|
||||
this.commitCommandCenter.postCommitCommand = opts.postCommitCommand;
|
||||
@@ -1288,19 +1289,7 @@ export class Repository implements Disposable {
|
||||
await this.repository.commit(message, opts);
|
||||
await this.commitOperationCleanup(message, opts);
|
||||
},
|
||||
(): GitResourceGroups => {
|
||||
let untrackedGroup: Resource[] | undefined = undefined,
|
||||
workingTreeGroup: Resource[] | undefined = undefined;
|
||||
|
||||
if (opts.all === 'tracked') {
|
||||
workingTreeGroup = this.workingTreeGroup.resourceStates
|
||||
.filter(r => r.type === Status.UNTRACKED);
|
||||
} else if (opts.all) {
|
||||
untrackedGroup = workingTreeGroup = [];
|
||||
}
|
||||
|
||||
return { indexGroup: [], untrackedGroup, workingTreeGroup };
|
||||
});
|
||||
() => this.commitOperationGetOptimisticResourceGroups(opts));
|
||||
|
||||
// Execute post-commit command
|
||||
await this.run(Operation.PostCommitCommand, async () => {
|
||||
@@ -1321,6 +1310,20 @@ export class Repository implements Disposable {
|
||||
this.closeDiffEditors(indexResources, workingGroupResources);
|
||||
}
|
||||
|
||||
private commitOperationGetOptimisticResourceGroups(opts: CommitOptions): GitResourceGroups {
|
||||
let untrackedGroup: Resource[] | undefined = undefined,
|
||||
workingTreeGroup: Resource[] | undefined = undefined;
|
||||
|
||||
if (opts.all === 'tracked') {
|
||||
workingTreeGroup = this.workingTreeGroup.resourceStates
|
||||
.filter(r => r.type === Status.UNTRACKED);
|
||||
} else if (opts.all) {
|
||||
untrackedGroup = workingTreeGroup = [];
|
||||
}
|
||||
|
||||
return { indexGroup: [], mergeGroup: [], untrackedGroup, workingTreeGroup };
|
||||
}
|
||||
|
||||
async clean(resources: Uri[]): Promise<void> {
|
||||
await this.run(Operation.Clean, async () => {
|
||||
const toClean: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user